Skip to content
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

Allow user not to install llvm shared object #53852

Closed
Keruspe opened this issue Aug 31, 2018 · 4 comments
Closed

Allow user not to install llvm shared object #53852

Keruspe opened this issue Aug 31, 2018 · 4 comments
Labels
T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@Keruspe
Copy link
Contributor

Keruspe commented Aug 31, 2018

Current rust nightly installs /usr/lib/libLLVM-7.so. This will cause conflict with the system-provided llvm as soon as llvm 7 is packaged.
It is thus impossible to use the rust-provided llvm in a future-proof way for system packages, making it mandatory to use the system-provided llvm (lacking rust patches).

It would be great to provide a way to use static linking like before (even if that means duplicating work with the thinLTO stuff).

@nagisa
Copy link
Member

nagisa commented Aug 31, 2018

We probably should link LLVM into the backend shared library statically.

@nagisa nagisa added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Aug 31, 2018
@cuviper
Copy link
Member

cuviper commented Aug 31, 2018

This is a consequence of #53245 which started linking LLVM tools dynamically and #53828 which moved libLLVM to the main rustc component to be easily shared. I believe the codegen-backends are still linked statically to LLVM though.

@cuviper
Copy link
Member

cuviper commented Aug 31, 2018

A simple change would be to just add a custom suffix to Rust's LLVM build, something like:

cmake -DLLVM_VERSION_SUFFIX=-rust

@Keruspe
Copy link
Contributor Author

Keruspe commented Aug 31, 2018

Something like that would be great.
Making that configurable in cargo.toml would be even better (so that nightly, beta and stable can still be installed at the same time without colliding with each other)

kennytm added a commit to kennytm/rust that referenced this issue Sep 7, 2018
rustbuild: allow configuring llvm version suffix

Fixes rust-lang#53852 by allowing user to install different versions of rust to the same sysroot.
kennytm added a commit to kennytm/rust that referenced this issue Sep 8, 2018
rustbuild: allow configuring llvm version suffix

Fixes rust-lang#53852 by allowing user to install different versions of rust to the same sysroot.
kennytm added a commit to kennytm/rust that referenced this issue Sep 8, 2018
rustbuild: allow configuring llvm version suffix

Fixes rust-lang#53852 by allowing user to install different versions of rust to the same sysroot.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants