llvm-config --libs does not produce correct output since commit r260263
(llvm-config: Add preliminary Windows support) changed naming format of
the libraries. This patch updates llvm-config to recognize new naming
format and output correct linker flags.
Details
Diff Detail
Event Timeline
I suspect that this does not do the right thing on Windows. Now --libs prints Unix style -l options, instead of paths as it was made to do in the revision you're pointing at.
Ehsan, what did you intend the behavior of --libs on Windows to be? We definitely want to use -l flags on Unix, like we did before.
It does not do anything special on any OS, but I guess it should. I'm happy to adjust it for Windows if you give me the specification.
(Sorry for the delay, I just got back from vacation!)
The right behavior on Windows would be to print the path to the library so that the linker picks it up, as this patch does.
tools/llvm-config/llvm-config.cpp | ||
---|---|---|
671–672 | Nit: you can hoist this own into the else branch. | |
672–677 | This will do the wrong thing on Cygwin/Mingw (see the code around line 359.) I think you should check isWindowsMSVCEnvironment() here instead. |
Sorry for the delay, I only read "ehsan accepted this revision" and did not notice there were comments.
LGTM!
It fixed the problem that our project could not built with llvm 3.9.
Hope this fix can merge in soon.
Thanks.
Nit: you can hoist this own into the else branch.