File tree 2 files changed +7
-1
lines changed
bootstrap/src/core/build_steps
tools/miri/cargo-miri/src
2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -2755,6 +2755,10 @@ impl Step for Crate {
2755
2755
// `lib.rs` file, and a `lib.miri.rs` file exists in the same folder, we build that
2756
2756
// instead. But crucially we only do that for the library, not the test builds.
2757
2757
cargo. env ( "MIRI_REPLACE_LIBRS_IF_NOT_TEST" , "1" ) ;
2758
+ // std needs to be built with `-Zforce-unstable-if-unmarked`. For some reason the builder
2759
+ // does not set this directly, but relies on the rustc wrapper to set it, and we are not using
2760
+ // the wrapper -- hence we have to set it ourselves.
2761
+ cargo. rustflag ( "-Zforce-unstable-if-unmarked" ) ;
2758
2762
cargo
2759
2763
} else {
2760
2764
// Also prepare a sysroot for the target.
Original file line number Diff line number Diff line change @@ -136,7 +136,9 @@ pub fn setup(
136
136
// But keep the overflow checks, they are cheap. This completely overwrites flags
137
137
// the user might have set, which is consistent with normal `cargo build` that does
138
138
// not apply `RUSTFLAGS` to the sysroot either.
139
- let rustflags = & [ "-Cdebug-assertions=off" , "-Coverflow-checks=on" ] ;
139
+ // We also need to set `force-unstable-if-unmarked` to ensure the sysroot builds.
140
+ let rustflags =
141
+ & [ "-Cdebug-assertions=off" , "-Coverflow-checks=on" , "-Zforce-unstable-if-unmarked" ] ;
140
142
141
143
let mut after_build_output = String :: new ( ) ; // what should be printed when the build is done.
142
144
let notify = || {
You can’t perform that action at this time.
0 commit comments