Skip to content

Commit 1aac99d

Browse files
Provide bootstrap tools with RUSTC in environment
1 parent a625ab7 commit 1aac99d

File tree

4 files changed

+9
-3
lines changed

4 files changed

+9
-3
lines changed

src/bootstrap/test.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1281,6 +1281,8 @@ impl Step for Compiletest {
12811281
cmd.arg("--rustfix-coverage");
12821282
}
12831283

1284+
cmd.env("BOOTSTRAP_CARGO", &builder.initial_cargo);
1285+
12841286
builder.ci_env.force_coloring_in_ci(&mut cmd);
12851287

12861288
builder.info(&format!(

src/bootstrap/tool.rs

+4
Original file line numberDiff line numberDiff line change
@@ -700,6 +700,10 @@ impl<'a> Builder<'a> {
700700
}
701701

702702
add_dylib_path(lib_paths, &mut cmd);
703+
704+
// Provide a RUSTC for this command to use.
705+
cmd.env("RUSTC", &self.initial_rustc);
706+
703707
cmd
704708
}
705709
}

src/test/run-make/thumb-none-cortex-m/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,4 @@ all:
3535
# HACK(eddyb) sets `RUSTC_BOOTSTRAP=1` so Cargo can accept nightly features.
3636
# These come from the top-level Rust workspace, that this crate is not a
3737
# member of, but Cargo tries to load the workspace `Cargo.toml` anyway.
38-
cd $(WORK_DIR) && cd $(CRATE) && env RUSTC_BOOTSTRAP=1 $(CARGO) build --target $(TARGET) -v
38+
cd $(WORK_DIR) && cd $(CRATE) && env RUSTC_BOOTSTRAP=1 $(BOOTSTRAP_CARGO) build --target $(TARGET) -v

src/test/run-make/thumb-none-qemu/script.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ pushd $WORK_DIR
1212
# These come from the top-level Rust workspace, that this crate is not a
1313
# member of, but Cargo tries to load the workspace `Cargo.toml` anyway.
1414
env RUSTC_BOOTSTRAP=1 RUSTFLAGS="-C linker=arm-none-eabi-ld -C link-arg=-Tlink.x" \
15-
$CARGO run --target $TARGET | grep "x = 42"
15+
$BOOTSTRAP_CARGO run --target $TARGET | grep "x = 42"
1616
env RUSTC_BOOTSTRAP=1 RUSTFLAGS="-C linker=arm-none-eabi-ld -C link-arg=-Tlink.x" \
17-
$CARGO run --target $TARGET --release | grep "x = 42"
17+
$BOOTSTRAP_CARGO run --target $TARGET --release | grep "x = 42"
1818
popd
1919
popd

0 commit comments

Comments
 (0)