File tree 2 files changed +18
-2
lines changed
2 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -194,6 +194,8 @@ fn main() {
194
194
// do that we pass a weird flag to the compiler to get it to do
195
195
// so. Note that this is definitely a hack, and we should likely
196
196
// flesh out rpath support more fully in the future.
197
+ //
198
+ // FIXME: remove condition after next stage0
197
199
if stage != "0" {
198
200
cmd. arg ( "-Z" ) . arg ( "osx-rpath-install-name" ) ;
199
201
}
@@ -218,6 +220,17 @@ fn main() {
218
220
cmd. arg ( "-Z" ) . arg ( "unstable-options" ) ;
219
221
cmd. arg ( "-C" ) . arg ( "target-feature=+crt-static" ) ;
220
222
}
223
+
224
+ // Force all crates compiled by this compiler to (a) be unstable and (b)
225
+ // allow the `rustc_private` feature to link to other unstable crates
226
+ // also in the sysroot.
227
+ //
228
+ // FIXME: remove condition after next stage0
229
+ if env:: var_os ( "RUSTC_FORCE_UNSTABLE" ) . is_some ( ) {
230
+ if stage != "0" {
231
+ cmd. arg ( "-Z" ) . arg ( "force-unstable-if-unmarked" ) ;
232
+ }
233
+ }
221
234
}
222
235
223
236
if verbose > 1 {
Original file line number Diff line number Diff line change @@ -479,7 +479,8 @@ impl Build {
479
479
// compiled with debuginfo.
480
480
if mode != Mode :: Tool {
481
481
cargo. env ( "RUSTC_DEBUGINFO" , self . config . rust_debuginfo . to_string ( ) )
482
- . env ( "RUSTC_DEBUGINFO_LINES" , self . config . rust_debuginfo_lines . to_string ( ) ) ;
482
+ . env ( "RUSTC_DEBUGINFO_LINES" , self . config . rust_debuginfo_lines . to_string ( ) )
483
+ . env ( "RUSTC_FORCE_UNSTABLE" , "1" ) ;
483
484
}
484
485
485
486
// Enable usage of unstable features
@@ -524,7 +525,9 @@ impl Build {
524
525
// the comipiler, libs, and tests are stable and we don't want to make
525
526
// their deps unstable (since this would break the first invariant
526
527
// above).
527
- if mode != Mode :: Tool {
528
+ //
529
+ // FIXME: remove this after next stage0
530
+ if mode != Mode :: Tool && stage == 0 {
528
531
cargo. env ( "RUSTBUILD_UNSTABLE" , "1" ) ;
529
532
}
530
533
You can’t perform that action at this time.
0 commit comments