Skip to content

Commit

Permalink
fix, found two different crates with name core
Browse files Browse the repository at this point in the history
  • Loading branch information
collin5 committed Sep 6, 2018
1 parent 093d9a6 commit 5653421
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 31 deletions.
25 changes: 7 additions & 18 deletions src/bootstrap/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -719,28 +719,19 @@ impl<'a> Builder<'a> {
_ => self.stage_out(compiler, mode),
};

// This is for the original compiler, but if we're forced to use stage 1, then
// std/test/rustc stamps won't exist in stage 2, so we need to get those from stage 1, since
// we copy the libs forward.
let cmp = if self.force_use_stage1(compiler, target) {
self.compiler(1, compiler.host)
} else {
compiler
};

let libstd_stamp = match cmd {
"check" => check::libstd_stamp(self, cmp, target),
_ => compile::libstd_stamp(self, cmp, target),
"check" => check::libstd_stamp(self, compiler, target),
_ => compile::libstd_stamp(self, compiler, target),
};

let libtest_stamp = match cmd {
"check" => check::libtest_stamp(self, cmp, target),
_ => compile::libstd_stamp(self, cmp, target),
"check" => check::libtest_stamp(self, compiler, target),
_ => compile::libstd_stamp(self, compiler, target),
};

let librustc_stamp = match cmd {
"check" => check::librustc_stamp(self, cmp, target),
_ => compile::librustc_stamp(self, cmp, target),
"check" => check::librustc_stamp(self, compiler, target),
_ => compile::librustc_stamp(self, compiler, target),
};

if cmd == "doc" {
Expand All @@ -764,9 +755,7 @@ impl<'a> Builder<'a> {
self.clear_if_dirty(&my_out, &libtest_stamp);
},
Mode::Codegen => {
self.clear_if_dirty(&my_out, &self.rustc(compiler));
self.clear_if_dirty(&my_out, &libstd_stamp);
self.clear_if_dirty(&my_out, &libtest_stamp);
self.clear_if_dirty(&my_out, &librustc_stamp);
},
Mode::ToolBootstrap => { },
Mode::ToolStd => {
Expand Down
18 changes: 9 additions & 9 deletions src/bootstrap/check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,6 @@ impl Step for CodegenBackend {
let target = self.target;
let backend = self.backend;

let out_dir = builder.cargo_out(compiler, Mode::Codegen, target);
builder.clear_if_dirty(&out_dir, &librustc_stamp(builder, compiler, target));

let mut cargo = builder.cargo(compiler, Mode::Codegen, target, "check");
cargo.arg("--manifest-path").arg(builder.src.join("src/librustc_codegen_llvm/Cargo.toml"));
rustc_cargo_env(builder, &mut cargo);
Expand Down Expand Up @@ -210,14 +207,9 @@ impl Step for Rustdoc {
}

fn run(self, builder: &Builder) {
let compiler = builder.compiler(0, builder.config.build);
let mut compiler = builder.compiler(0, builder.config.build);
let target = self.target;

let stage_out = builder.stage_out(compiler, Mode::ToolRustc);
builder.clear_if_dirty(&stage_out, &libstd_stamp(builder, compiler, target));
builder.clear_if_dirty(&stage_out, &libtest_stamp(builder, compiler, target));
builder.clear_if_dirty(&stage_out, &librustc_stamp(builder, compiler, target));

let mut cargo = prepare_tool_cargo(builder,
compiler,
Mode::ToolRustc,
Expand All @@ -236,6 +228,14 @@ impl Step for Rustdoc {

let libdir = builder.sysroot_libdir(compiler, target);
add_to_sysroot(&builder, &libdir, &rustdoc_stamp(builder, compiler, target));

// This is for the original compiler, but if we're forced to use stage 1, then
// std/test/rustc stamps won't exist in stage 2, so we need to get those from stage 1, since
// we copy the libs forward.
if builder.force_use_stage1(compiler, target) {
compiler = builder.compiler(1, compiler.host)
};

builder.cargo(compiler, Mode::ToolRustc, target, "clean");
}
}
Expand Down
29 changes: 25 additions & 4 deletions src/bootstrap/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ impl Step for StdLink {
/// output directory.
fn run(self, builder: &Builder) {
let compiler = self.compiler;
let target_compiler = self.target_compiler;
let mut target_compiler = self.target_compiler;
let target = self.target;
builder.info(&format!("Copying stage{} std from stage{} ({} -> {} / {})",
target_compiler.stage,
Expand All @@ -243,6 +243,13 @@ impl Step for StdLink {
copy_apple_sanitizer_dylibs(builder, &builder.native_dir(target), "osx", &libdir);
}

// This is for the original compiler, but if we're forced to use stage 1, then
// std/test/rustc stamps won't exist in stage 2, so we need to get those from stage 1, since
// we copy the libs forward.
if builder.force_use_stage1(target_compiler, target) {
target_compiler = builder.compiler(1, target_compiler.host)
};

builder.cargo(target_compiler, Mode::ToolStd, target, "clean");
}
}
Expand Down Expand Up @@ -429,7 +436,7 @@ impl Step for TestLink {
/// Same as `std_link`, only for libtest
fn run(self, builder: &Builder) {
let compiler = self.compiler;
let target_compiler = self.target_compiler;
let mut target_compiler = self.target_compiler;
let target = self.target;
builder.info(&format!("Copying stage{} test from stage{} ({} -> {} / {})",
target_compiler.stage,
Expand All @@ -440,6 +447,13 @@ impl Step for TestLink {
add_to_sysroot(builder, &builder.sysroot_libdir(target_compiler, target),
&libtest_stamp(builder, compiler, target));

// This is for the original compiler, but if we're forced to use stage 1, then
// std/test/rustc stamps won't exist in stage 2, so we need to get those from stage 1, since
// we copy the libs forward.
if builder.force_use_stage1(target_compiler, target) {
target_compiler = builder.compiler(1, target_compiler.host)
};

builder.cargo(target_compiler, Mode::ToolTest, target, "clean");
}
}
Expand Down Expand Up @@ -588,7 +602,7 @@ impl Step for RustcLink {
/// Same as `std_link`, only for librustc
fn run(self, builder: &Builder) {
let compiler = self.compiler;
let target_compiler = self.target_compiler;
let mut target_compiler = self.target_compiler;
let target = self.target;
builder.info(&format!("Copying stage{} rustc from stage{} ({} -> {} / {})",
target_compiler.stage,
Expand All @@ -598,6 +612,14 @@ impl Step for RustcLink {
target));
add_to_sysroot(builder, &builder.sysroot_libdir(target_compiler, target),
&librustc_stamp(builder, compiler, target));

// This is for the original compiler, but if we're forced to use stage 1, then
// std/test/rustc stamps won't exist in stage 2, so we need to get those from stage 1, since
// we copy the libs forward.
if builder.force_use_stage1(target_compiler, target) {
target_compiler = builder.compiler(1, target_compiler.host)
};

builder.cargo(target_compiler, Mode::ToolRustc, target, "clean");
}
}
Expand Down Expand Up @@ -655,7 +677,6 @@ impl Step for CodegenBackend {
}

let out_dir = builder.cargo_out(compiler, Mode::Codegen, target);
builder.clear_if_dirty(&out_dir, &librustc_stamp(builder, compiler, target));

let mut cargo = builder.cargo(compiler, Mode::Codegen, target, "rustc");
cargo.arg("--manifest-path")
Expand Down

0 comments on commit 5653421

Please sign in to comment.