Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Support installing with linking to non-system libraries #69865
Currently, toolchains installed with rustup use system library path and the system dynamic linker.
In some environment it makes installing and using rust overly complicated. My specific use case is a shared environment where the system libs are quite old so users manage their own installations with linuxbrew in their respective homes.
It would be nice to have a way to tell rustup to use other linkers and other library path. Maybe with a flag like
rustup doesn't actually build rust libstd or rustc - they are built on build machines and rustup merely downloads and unpacks for use.
You can build your own rust and then link a custom toolchain, though this is not without compromises, but it would allow you to have rust binaries that are built against your linuxbrew libraries.
I think though, since rustc etc aren't segfaulting or behaving really badly, that this is more a configuration issue with rustc, rather than an issue with the install - so I'm going to move this issue to the rust repository, rather than rustup: rustup's job is to install a rust toolchain (rustc, cargo, etc); whereas your feature request is about what the compiler should do.
@the8472 Maybe in wrappers around toolchain executables? That's one reason why I was thinking of doing it at rustup level since there are already wrappers defined there. Doing that in the parent shell environment is not a good idea as you still have to rely on some system executables and that might break them.