You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Many linux distros build LLVM as shared libraries only, so statically linking is not possible. For various reasons it's preferred to use the system LLVM instead of the bundled one, which requires that rustc is also linked dynamically against LLVM libraries.
rustc's configure has an option --enable-llvm-link-shared to do that, which internally sets the LLVM_LINK_SHARED environment variable to 1. Doing the same with mrustc's bootstrap scripts works, but only until the final link of rustc_main. I think this is because the rustc-link-lib=dylib=LLVM flag from the rustc_llvm crate's build config is not taken into account when linking the final rustc_main binary. I added a hack to minicargo/build.cpp to add -lLLVM when building rustc_main and the binary is built successfully that way.
The text was updated successfully, but these errors were encountered:
Many linux distros build LLVM as shared libraries only, so statically linking is not possible. For various reasons it's preferred to use the system LLVM instead of the bundled one, which requires that
rustc
is also linked dynamically against LLVM libraries.rustc
'sconfigure
has an option--enable-llvm-link-shared
to do that, which internally sets theLLVM_LINK_SHARED
environment variable to1
. Doing the same withmrustc
's bootstrap scripts works, but only until the final link ofrustc_main
. I think this is because therustc-link-lib=dylib=LLVM
flag from therustc_llvm
crate's build config is not taken into account when linking the finalrustc_main
binary. I added a hack tominicargo/build.cpp
to add-lLLVM
when buildingrustc_main
and the binary is built successfully that way.The text was updated successfully, but these errors were encountered: