-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Linking to rustc_llvm with --llvm-root #30970
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
Comments
There are no static libraries which depend on LLVM right? So there is no reason linking to rustc_plugin would require linking in LLVM libraries? |
Linking to LLVM doesn't happen on OS X or debian, but it does on x86_64-mingw-w64 with msys2 |
@DiamondLovesYou Do you think this is related to #27937? I know this used to work on one of your earlier Linking errors:
|
@Zoxc The error you've provided is the result of a missing -L path, specifically the one pointing to where LLVM's Rust doesn't install any LLVM static or shared libraries (this includes MSVCs |
You should only transitively link to dependencies of a dependency if the immediate dependency is a a static library. |
Well there is the case were an upstream Rust shared library has generic code which links to a native library. So I guess the behavior is justified. That means we have to ensure LLVM's lib path is passed to the linker with |
Metadata should not hold paths to deps. The path must be provided by |
This is a workaround for what appears to be issue rust-lang/rust#30970. Without this change, rustcMaster will fail to build the clippy library due to linking errors against LLVM (and ncurses, for some reason). I expect this commit to be reverted once that issue is fixed upstream.
I believe in the transition to rustbuild everything about LLVM changed enough that this is either likely fixed or no longe relevant, so closing. |
@alexcrichton I doubt that is true. |
Same on Gentoo Linux after libraries were moved from |
Triage: no idea what the status of this is. |
This needs instructions on how to reproduce the issue at least (ideally a set of shell commands, including how to obtain LLVM directories). |
If you link to rustc_llvm with a rustc configured with --llvm-root the path to the LLVM libraries is not passed to the linker resulting in linking errors
The text was updated successfully, but these errors were encountered: