[cfe-dev] Compiling a simple Win32 program
Jon
jon.forums at gmail.com
Tue Jun 12 07:05:40 PDT 2012
> > 2. There is a much better way to solve the problem of choosing the linker.
> > Clang should look for the active linker using the environment variables.
> > This way it will always find "the right one", provided that Clang was
> > invoked through desired Visual Studio Tools Command Prompt (running
> > vcvars.bat is also an option). The same should go for msys. This is what I
> > plan to do next, at least the Visual Studio part since I know very little
> > about msys. The patch that was attached in this thread can be safely ignored
> > :)
>
> That sounds like it would match my expectations for behavior, good idea!
>
> Can you have it fall back on %PATH% if no VS environment variables are found?
What specific env vars are you referring to when you say "...look for the active linker using the environment variables."?
Or are you saying do `link /?` or `ld --version` and expect the tools to be on PATH?
For example, when I fire up an Win7 SDK environment via
cmd.exe /E:ON /V:ON /T:0E /K "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.Cmd" /x86 /release /win7
I see no static env vars specifying the active linker. Similarly, I see no static env vars for an msys shell or msys-mingw-in-cmd.exe environment.
Jon
---
Fail fast. Fail often. Fail publicly. Learn. Adapt. Repeat.
http://thecodeshop.github.com | http://jonforums.github.com/
twitter: @jonforums
More information about the cfe-dev
mailing list