Skip to content

Commit 9653b80

Browse files
committed
Add libcore_stamp
1 parent 027dfe9 commit 9653b80

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/bootstrap/compile.rs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ impl Step for Std {
115115
&compiler.host, target));
116116
run_cargo(builder,
117117
&mut core_cargo_invoc,
118-
&libstd_stamp(builder, compiler, target),
118+
&libcore_stamp(builder, compiler, target),
119119
false);
120120
builder.ensure(CoreLink {
121121
compiler: builder.compiler(compiler.stage, builder.config.build),
@@ -262,7 +262,7 @@ impl Step for CoreLink {
262262
target_compiler.host,
263263
target));
264264
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));
266266
}
267267
}
268268

@@ -434,6 +434,7 @@ impl Step for Test {
434434
}
435435

436436
let out_dir = builder.cargo_out(compiler, Mode::Test, target);
437+
builder.clear_if_dirty(&out_dir, &libcore_stamp(builder, compiler, target));
437438
builder.clear_if_dirty(&out_dir, &libstd_stamp(builder, compiler, target));
438439
let mut cargo = builder.cargo(compiler, Mode::Test, target, "build");
439440
test_cargo(builder, &compiler, target, &mut cargo);
@@ -553,6 +554,7 @@ impl Step for Rustc {
553554
target: builder.config.build,
554555
});
555556
let cargo_out = builder.cargo_out(compiler, Mode::Rustc, target);
557+
builder.clear_if_dirty(&cargo_out, &libcore_stamp(builder, compiler, target));
556558
builder.clear_if_dirty(&cargo_out, &libstd_stamp(builder, compiler, target));
557559
builder.clear_if_dirty(&cargo_out, &libtest_stamp(builder, compiler, target));
558560

@@ -853,6 +855,12 @@ fn copy_lld_to_sysroot(builder: &Builder,
853855
builder.copy(&lld_install_root.join("bin").join(&exe), &dst.join(&exe));
854856
}
855857

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+
856864
/// Cargo's output path for the standard library in a given stage, compiled
857865
/// by a particular compiler for the specified target.
858866
pub fn libstd_stamp(builder: &Builder, compiler: Compiler, target: Interned<String>) -> PathBuf {

0 commit comments

Comments
 (0)