Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/bootstrap/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -442,12 +442,7 @@ impl Build {
let workspace_target_dir = std::env::var("CARGO_TARGET_DIR")
.map(PathBuf::from)
.unwrap_or_else(|_| src.join("target"));
let bootstrap_out = workspace_target_dir.join("debug");
if !bootstrap_out.join("rustc").exists() {
// this restriction can be lifted whenever https://github.com/rust-lang/rfcs/pull/3028 is implemented
panic!("run `cargo build --bins` before `cargo run`")
}
bootstrap_out
workspace_target_dir.join("debug")
};

let mut build = Build {
Expand Down Expand Up @@ -490,6 +485,11 @@ impl Build {
tool_artifacts: Default::default(),
};

if env::var("BOOTSTRAP_PYTHON").is_err() {
// This can be removed whenever https://github.com/rust-lang/rfcs/pull/3028 is implemented.
build.run(Command::new(env!("CARGO")).args(&["build", "-p", "bootstrap", "--bins"]));
}

build.verbose("finding compilers");
cc_detect::find(&mut build);
// When running `setup`, the profile is about to change, so any requirements we have now may
Expand Down