-
Notifications
You must be signed in to change notification settings - Fork 930
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
rust-analyzer +nightly
(and similar) should not set LD_LIBRARY_PATH
#4245
Comments
Could you expand on the difference between |
|
We do depend on rustc crates when built in tree, and we also link against the rustc driver dylib iirc |
oh. well, never mind, then. |
Problem you are trying to solve
I am trying to reduce the number of spurious rebuilds that occur in rust-lang/rust itself. One such spurious rebuild happens when using rustup-managed rust-analyzer, in which case rustup sets
LD_LIBRARY_PATH
. See rust-lang/rust#138333 for more details about why that causes issues.Solution you'd like
Rust-analyzer does not use rustc_private libraries, and my understanding is that their architecture is very specifically designed so that they will never need to (@rust-lang/rust-analyzer, can you confirm?). That means that rustup does not need to set
LD_LIBRARY_PATH
for that proxy.In particular, the following should leave LD_LIBRARY_PATH unmodified:
rust-analyzer
(when rust-analyzer is a rustup-managed toolchain proxy)rust-analyzer +toolchain
these should still add
rustc --print target-libdir
to LD_LIBRARY_PATH:rustup run toolchain rust-analyzer
cargo +nightly
(and all other proxies)Notes
The text was updated successfully, but these errors were encountered: