-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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 sysroot is not exposed to build scripts #7501
Comments
Instead of (or in addition to) a RUST_SYSROOT, what I would really like is for a separate flags containing the proper CLI arguments to pass to rustc to be provided to build scripts. In Ideally, we'd have a
|
I'd like to point out that there may be more than one sysroot. Many (most?) cross compilation environments such as openembedded keeps the binaries and libraries for BUILD separate from that of HOST, where BUILD is the architecture of the building machine and HOST is the machine supposed to run the code. It isn't expected that all targets share path in the way that rustup sets things up. For this reason I don't think it's enough with only one environment variable specifying one sysroot. It is perfectly possible today to set up a different sysroot per target by using a |
The build script would be invoked separately for each target though, so such environment variables can be provided specific to each. |
#11244 also includes discussion on build probes. |
Closing for similar reason as #11244
|
When building with wrappers like xargo or the new
-Z build std
flag, rustc invocations get a--sysroot [something]
flag passed to them. Any build scripts that rely on running a new rustc invocation that matches the current build configuration as closely as possible (such as autocfg is out of luck, because replicating the sysroot needs to be done manually. If the sysroot path were exposed through aRUST_SYSROOT
environment variable to build scripts then this would be easier to deal with.The text was updated successfully, but these errors were encountered: