-
-
Notifications
You must be signed in to change notification settings - Fork 264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
0.16.0-beta2 msvc automatic detection #1152
Comments
|
Thx for reporting, I'll look into it tomorrow (I guess). |
|
Okay I get the same error with the beta release - but a manually built & installed LDC (branch |
|
Btw, when using the verbose |
|
Oh, looks like it's the couple of backslashes in /LIBPATH messing up LLVM's launch-process logic. Should be fixed by #1153. |
|
@redstar: There's a |
|
I retested with LDC-Win64-master-297, looking better, but I guess the final issue you fixed in #1153 is not yet included, so I'll check back in a while if there's a 298 build... |
|
The 303 build (now available) includes it + is portable (the problem only surfaced in portable builds). |
|
confirmed, thanks! :) |
|
Cool. Thx again for reporting, having that bug in the final 0.16 release would have been embarrassing. :) |
|
@kinke Thanks for the hint. I remove the switch in the next release. |
|
I still see the same issue caused by the path to the batch file containing back slashes. |
|
@rainers: I guess your installation path includes a space - I've just tested that, and it doesn't work. I've coded a workaround, but it's ugly. All Microsoft's fault of course - this command line sent to CreateProcess(): is internally transformed to: Now guess what - cmd.exe treats the command string after /c or /k in a very special way if it begins with double quotes and is followed by other quoted args. In this example, it tries to invoke: Another example: The fix seems to be enclosing the whole command with additional double quotes (and no additional escaping!) and using |
|
My path is I suspect we need the escaping inside linker.cpp anyway (see #1160 and #1163), so we might also use it for escaping the batch file name. |
|
Okay, this should finally be fixed by #1165. @rainers: could you please verify the backslashes in your batch file path don't cause any trouble anymore? You could fetch the CI build from https://ci.appveyor.com/project/kinke/ldc/build/1.0.319/job/sh1hjkllr9ykn620/artifacts. |
I've merged your PR into my local branch. Seems to work fine. Thanks. |
|
Perfect, thanks Rainer. I'll re-close the issue then; I've tested it with installation paths with and without spaces, in both a VS command prompt and a naked cmd.exe environment, and with 1 successful and 1 failing linking operation, and everything works as expected. |
ldc2 works perfectly fine when running from "VS2015 x64 Native Tools Command Prompt", as always!
The new auto detect feature seems to have some issues though, but since it's a new feature... it's not a true regression.
ldc2 test.d
"The filename, directory name or volume label syntax is incorrect.
Error: C:\lang\ldc2\bin\amd64.bat failed with status: 1"
But when manually launching amd64.bat it works fine...
"Using Visual Studio: C:\lang\Microsoft Visual Studio 14.0"
Which I found curious, and decided to use process monitor to try and figure out what was up, it claimed that the following command failed:
"C:\lang\ldc2\bin\amd64.bat link.exe \NOLOGO \LARGEADDRESSAWARE \OPT:REF \OPT:ICF \OUT:test.exe test.obj \LIBPATH:C:\lang\ldc2"
All these options to link should use forward slashes!
The text was updated successfully, but these errors were encountered: