Provide bootstrap tools with RUSTC in environment

This commit is contained in:
Mark Rousskov 2020-09-10 10:17:32 -04:00
parent a625ab77e8
commit 1aac99de25
4 changed files with 9 additions and 3 deletions

View File

@ -1281,6 +1281,8 @@ impl Step for Compiletest {
cmd.arg("--rustfix-coverage");
}
cmd.env("BOOTSTRAP_CARGO", &builder.initial_cargo);
builder.ci_env.force_coloring_in_ci(&mut cmd);
builder.info(&format!(

View File

@ -700,6 +700,10 @@ impl<'a> Builder<'a> {
}
add_dylib_path(lib_paths, &mut cmd);
// Provide a RUSTC for this command to use.
cmd.env("RUSTC", &self.initial_rustc);
cmd
}
}

View File

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

View File

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