Closed
Description
In 1.12, src/librustc_llvm/build.rs
figures out which libraries it needs for external LLVM using llvm-config --libs
which breaks if you have LLVM with -DLLVM_BUILD_LLVM_DYLIB=ON
and -DLLVM_LINK_LLVM_DYLIB=OFF
(which is needed for clang 3.9 these days), since then there is a dynamic libLLVM3.9.so
and lots of libLLVM*.a
, but the code sees the libLLVM
and decides it has to link statically, which fails.
The code should decide whether to link static or dynamic first, and then call llvm-config --libs --link-shared
resp --link-static
, to get the correct library name.