Skip to content

Commit 1373269

Browse files
Cleanups and fixes throughout
1 parent 939a98b commit 1373269

File tree

6 files changed

+118
-127
lines changed

6 files changed

+118
-127
lines changed

src/bootstrap/check.rs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,7 @@ impl<'a> Step<'a> for Compiletest<'a> {
550550

551551
builder.ensure(dist::DebuggerScripts {
552552
sysroot: &builder.sysroot(compiler),
553-
host: compiler.host
553+
target: target
554554
});
555555

556556
if mode == "debuginfo-gdb" {
@@ -1274,7 +1274,7 @@ impl<'a> Step<'a> for RemoteCopyLibs<'a> {
12741274
println!("REMOTE copy libs to emulator ({})", target);
12751275
t!(fs::create_dir_all(build.out.join("tmp")));
12761276

1277-
let server = builder.ensure(tool::RemoteTestServer { compiler, target }));
1277+
let server = builder.ensure(tool::RemoteTestServer { stage: compiler.stage, target });
12781278

12791279
// Spawn the emulator and wait for it to come online
12801280
let tool = builder.tool_exe(Tool::RemoteTestClient);
@@ -1316,9 +1316,6 @@ impl<'a> Step<'a> for Distcheck {
13161316
fn run(self, builder: &Builder) {
13171317
let build = builder.build;
13181318

1319-
builder.ensure(dist::PlainSourceTarball);
1320-
builder.ensure(dist::Src);
1321-
13221319
if build.build != "x86_64-unknown-linux-gnu" {
13231320
return
13241321
}
@@ -1336,7 +1333,7 @@ impl<'a> Step<'a> for Distcheck {
13361333

13371334
let mut cmd = Command::new("tar");
13381335
cmd.arg("-xzf")
1339-
.arg(dist::rust_src_location(build))
1336+
.arg(builder.ensure(dist::PlainSourceTarball))
13401337
.arg("--strip-components=1")
13411338
.current_dir(&dir);
13421339
build.run(&mut cmd);
@@ -1356,7 +1353,7 @@ impl<'a> Step<'a> for Distcheck {
13561353

13571354
let mut cmd = Command::new("tar");
13581355
cmd.arg("-xzf")
1359-
.arg(dist::rust_src_installer(build))
1356+
.arg(builder.ensure(dist::Src))
13601357
.arg("--strip-components=1")
13611358
.current_dir(&dir);
13621359
build.run(&mut cmd);

src/bootstrap/compile.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -364,24 +364,21 @@ impl<'a> Step<'a> for StartupObjects<'a> {
364364
return
365365
}
366366

367-
let compiler = builder.compiler(0, &build.build);
368-
let compiler_path = builder.rustc(compiler);
369367
let src_dir = &build.src.join("src/rtstartup");
370368
let dst_dir = &build.native_dir(target).join("rtstartup");
371369
let sysroot_dir = &builder.sysroot_libdir(for_compiler, target);
372370
t!(fs::create_dir_all(dst_dir));
373-
t!(fs::create_dir_all(sysroot_dir));
374371

375372
for file in &["rsbegin", "rsend"] {
376373
let src_file = &src_dir.join(file.to_string() + ".rs");
377374
let dst_file = &dst_dir.join(file.to_string() + ".o");
378375
if !up_to_date(src_file, dst_file) {
379-
let mut cmd = Command::new(&compiler_path);
376+
let mut cmd = Command::new(&build.initial_rustc);
380377
build.run(cmd.env("RUSTC_BOOTSTRAP", "1")
381-
.arg("--cfg").arg(format!("stage{}", compiler.stage))
378+
.arg("--cfg").arg("stage0")
382379
.arg("--target").arg(target)
383380
.arg("--emit=obj")
384-
.arg("--out-dir").arg(dst_dir)
381+
.arg("--o").arg(dst_file)
385382
.arg(src_file));
386383
}
387384

0 commit comments

Comments
 (0)