@@ -115,7 +115,7 @@ impl Step for Std {
115
115
& compiler. host, target) ) ;
116
116
run_cargo ( builder,
117
117
& mut core_cargo_invoc,
118
- & libstd_stamp ( builder, compiler, target) ,
118
+ & libcore_stamp ( builder, compiler, target) ,
119
119
false ) ;
120
120
builder. ensure ( CoreLink {
121
121
compiler : builder. compiler ( compiler. stage , builder. config . build ) ,
@@ -262,7 +262,7 @@ impl Step for CoreLink {
262
262
target_compiler. host,
263
263
target) ) ;
264
264
let libdir = builder. sysroot_libdir ( target_compiler, target) ;
265
- add_to_sysroot ( builder, & libdir, & libstd_stamp ( builder, compiler, target) ) ;
265
+ add_to_sysroot ( builder, & libdir, & libcore_stamp ( builder, compiler, target) ) ;
266
266
}
267
267
}
268
268
@@ -434,6 +434,7 @@ impl Step for Test {
434
434
}
435
435
436
436
let out_dir = builder. cargo_out ( compiler, Mode :: Test , target) ;
437
+ builder. clear_if_dirty ( & out_dir, & libcore_stamp ( builder, compiler, target) ) ;
437
438
builder. clear_if_dirty ( & out_dir, & libstd_stamp ( builder, compiler, target) ) ;
438
439
let mut cargo = builder. cargo ( compiler, Mode :: Test , target, "build" ) ;
439
440
test_cargo ( builder, & compiler, target, & mut cargo) ;
@@ -553,6 +554,7 @@ impl Step for Rustc {
553
554
target : builder. config . build ,
554
555
} ) ;
555
556
let cargo_out = builder. cargo_out ( compiler, Mode :: Rustc , target) ;
557
+ builder. clear_if_dirty ( & cargo_out, & libcore_stamp ( builder, compiler, target) ) ;
556
558
builder. clear_if_dirty ( & cargo_out, & libstd_stamp ( builder, compiler, target) ) ;
557
559
builder. clear_if_dirty ( & cargo_out, & libtest_stamp ( builder, compiler, target) ) ;
558
560
@@ -853,6 +855,12 @@ fn copy_lld_to_sysroot(builder: &Builder,
853
855
builder. copy ( & lld_install_root. join ( "bin" ) . join ( & exe) , & dst. join ( & exe) ) ;
854
856
}
855
857
858
+ /// Cargo's output path for libcore in a given stage, compiled
859
+ /// by a particular compiler for the specified target.
860
+ pub fn libcore_stamp ( builder : & Builder , compiler : Compiler , target : Interned < String > ) -> PathBuf {
861
+ builder. cargo_out ( compiler, Mode :: Std , target) . join ( ".libcore.stamp" )
862
+ }
863
+
856
864
/// Cargo's output path for the standard library in a given stage, compiled
857
865
/// by a particular compiler for the specified target.
858
866
pub fn libstd_stamp ( builder : & Builder , compiler : Compiler , target : Interned < String > ) -> PathBuf {
0 commit comments