Skip to content

Commit ddc1d29

Browse files
committed
bootstrap: tests should use rustc from config.toml
Tests should always use "rustc" and "cargo" from config.toml instead of assuming that stage0 binaries was downloaded to build directory.
1 parent 4faaf7e commit ddc1d29

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/bootstrap/bootstrap.py

+2
Original file line numberDiff line numberDiff line change
@@ -816,6 +816,8 @@ def bootstrap(help_triggered):
816816
env["BOOTSTRAP_PYTHON"] = sys.executable
817817
env["BUILD_DIR"] = build.build_dir
818818
env["RUSTC_BOOTSTRAP"] = '1'
819+
env["CARGO"] = build.cargo()
820+
env["RUSTC"] = build.rustc()
819821
run(args, env=env, verbose=build.verbose)
820822

821823

src/bootstrap/config.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ use std::cmp;
2323

2424
use num_cpus;
2525
use toml;
26-
use util::exe;
2726
use cache::{INTERNER, Interned};
2827
use flags::Flags;
2928
pub use flags::Subcommand;
@@ -367,9 +366,8 @@ impl Config {
367366
config.src = Config::path_from_python("SRC");
368367
config.out = Config::path_from_python("BUILD_DIR");
369368

370-
let stage0_root = config.out.join(&config.build).join("stage0/bin");
371-
config.initial_rustc = stage0_root.join(exe("rustc", &config.build));
372-
config.initial_cargo = stage0_root.join(exe("cargo", &config.build));
369+
config.initial_rustc = Config::path_from_python("RUSTC");
370+
config.initial_cargo = Config::path_from_python("CARGO");
373371

374372
config
375373
}

0 commit comments

Comments
 (0)