about summary refs log tree commit diff
path: root/src/bootstrap
diff options
context:
space:
mode:
authorNikolai Merinov <nikolai.merinov@member.fsf.org>2018-07-02 01:45:35 +0500
committerNikolai Merinov <nikolai.merinov@member.fsf.org>2018-07-02 21:28:58 +0500
commitddc1d294429e39cbc0b2b9e883b46592f896f412 (patch)
treea18ef286e7159dd598dc6d3136fd0baa572249b2 /src/bootstrap
parent4faaf7e3359fa78bad2e8c54011e94ce8ac078c6 (diff)
downloadrust-ddc1d294429e39cbc0b2b9e883b46592f896f412.tar.gz
rust-ddc1d294429e39cbc0b2b9e883b46592f896f412.zip
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.
Diffstat (limited to 'src/bootstrap')
-rw-r--r--src/bootstrap/bootstrap.py2
-rw-r--r--src/bootstrap/config.rs6
2 files changed, 4 insertions, 4 deletions
diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py
index a94792a2f9f..512d4d8c5b7 100644
--- a/src/bootstrap/bootstrap.py
+++ b/src/bootstrap/bootstrap.py
@@ -816,6 +816,8 @@ def bootstrap(help_triggered):
     env["BOOTSTRAP_PYTHON"] = sys.executable
     env["BUILD_DIR"] = build.build_dir
     env["RUSTC_BOOTSTRAP"] = '1'
+    env["CARGO"] = build.cargo()
+    env["RUSTC"] = build.rustc()
     run(args, env=env, verbose=build.verbose)
 
 
diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs
index e4d467c9272..b3ed10257bd 100644
--- a/src/bootstrap/config.rs
+++ b/src/bootstrap/config.rs
@@ -23,7 +23,6 @@ use std::cmp;
 
 use num_cpus;
 use toml;
-use util::exe;
 use cache::{INTERNER, Interned};
 use flags::Flags;
 pub use flags::Subcommand;
@@ -367,9 +366,8 @@ impl Config {
         config.src = Config::path_from_python("SRC");
         config.out = Config::path_from_python("BUILD_DIR");
 
-        let stage0_root = config.out.join(&config.build).join("stage0/bin");
-        config.initial_rustc = stage0_root.join(exe("rustc", &config.build));
-        config.initial_cargo = stage0_root.join(exe("cargo", &config.build));
+        config.initial_rustc = Config::path_from_python("RUSTC");
+        config.initial_cargo = Config::path_from_python("CARGO");
 
         config
     }