-
Notifications
You must be signed in to change notification settings - Fork 8
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
Possibly add a way to disable sysroot on rustc
#31
Comments
Yes this is definitely the right approach long term. Banish the sysroot! |
I would personally consider this a blocker for stabilization in one form or another. It should be easy enough and is basically a form of hygiene, but I just ran into some really weird errors locally which ended up being caused because rustc was still using its original sysroot to load the |
One thing I just thought of thinking about this again, if we turn off |
Fixed in rust-lang/cargo#7421 |
Switch build-std to use --extern Switch `build-std` to use `--extern` flags instead of `--sysroot`. This is mostly a revert of #7421. It uses the new extern flag options introduced in rust-lang/rust#67074. It avoids modifying the extern prelude which was the source of the problem of rust-lang/wg-cargo-std-aware#40. Closes rust-lang/wg-cargo-std-aware#49 Reopens rust-lang/wg-cargo-std-aware#31
Reopen due to rust-lang/cargo#7699. |
Temporarily fix standard_lib tests on linux. This fixes the standard_lib tests which are broken in the latest nightly. The latest nightly now requires rust-lld to be in the sysroot for x86_64-unknown-linux-gnu. This broke these tests which were trying to verify that the standard library is not required. This temporarily removes this validation, but we should have some way of enforcing it (rust-lang/wg-cargo-std-aware#31). cc rust-lang/rust#125246
The current implementation uses
--extern
flags to tellrustc
where the standard library dependencies are located. This runs into a few problems when a user attempts to useextern crate
for a crate that was not included. For example, ano_std
crate that hasextern std
, or anextern crate test
when libtest is not built. These will attempt to load from the default sysroot which causes a huge number of inscrutable errors.It may be nice to tell
rustc
to not look in the pre-built sysroot to avoid this problem (and will result in a nicer "crate not found" error). This can be done with--sysroot=nonexistent
or an empty directory. Alternatively, we can add a new flag torustc
to disable the sysroot search.This may have complications, since the sysroot is used for more than rlib dependencies. For example, it is also used for bundled things (like linkers? bundled crt objects?).
Beware this may affect things like clippy-driver, rustdoc, etc.
The text was updated successfully, but these errors were encountered: