Commit | Line | Data |
---|---|---|
f510a2b9 NM |
1 | Bootstrap tests failed with local stage0 cargo and rustc |
2 | Backported changes from https://github.com/rust-lang/rust/pull/51977 | |
3 | ||
4 | From 0834d9d771e912f51deca6c25699e44734624546 Mon Sep 17 00:00:00 2001 | |
5 | From: Nikolai Merinov <nikolai.merinov@member.fsf.org> | |
6 | Date: Mon, 2 Jul 2018 01:45:35 +0500 | |
7 | Subject: [PATCH] bootstrap: tests should use rustc from config.toml | |
8 | ||
9 | Tests should always use "rustc" and "cargo" from config.toml instead | |
10 | of assuming that stage0 binaries was downloaded to build directory. | |
11 | --- | |
12 | src/bootstrap/bootstrap.py | 2 ++ | |
13 | src/bootstrap/config.rs | 6 ++---- | |
14 | 2 files changed, 4 insertions(+), 4 deletions(-) | |
15 | ||
16 | diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py | |
17 | index 487440becf..1701f7b83a 100644 | |
18 | --- a/src/bootstrap/bootstrap.py | |
19 | +++ b/src/bootstrap/bootstrap.py | |
20 | @@ -788,6 +788,8 @@ def bootstrap(help_triggered): | |
21 | env["BOOTSTRAP_PARENT_ID"] = str(os.getpid()) | |
22 | env["BOOTSTRAP_PYTHON"] = sys.executable | |
23 | env["BUILD_DIR"] = build.build_dir | |
24 | + env["CARGO"] = build.cargo() | |
25 | + env["RUSTC"] = build.rustc() | |
26 | run(args, env=env, verbose=build.verbose) | |
27 | ||
28 | ||
29 | diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs | |
30 | index 6dd6291be2..d1a0deb583 100644 | |
31 | --- a/src/bootstrap/config.rs | |
32 | +++ b/src/bootstrap/config.rs | |
33 | @@ -23,7 +23,6 @@ use std::cmp; | |
34 | ||
35 | use num_cpus; | |
36 | use toml; | |
37 | -use util::exe; | |
38 | use cache::{INTERNER, Interned}; | |
39 | use flags::Flags; | |
40 | pub use flags::Subcommand; | |
41 | @@ -362,9 +361,8 @@ impl Config { | |
42 | config.src = Config::path_from_python("SRC"); | |
43 | config.out = Config::path_from_python("BUILD_DIR"); | |
44 | ||
45 | - let stage0_root = config.out.join(&config.build).join("stage0/bin"); | |
46 | - config.initial_rustc = stage0_root.join(exe("rustc", &config.build)); | |
47 | - config.initial_cargo = stage0_root.join(exe("cargo", &config.build)); | |
48 | + config.initial_rustc = Config::path_from_python("RUSTC"); | |
49 | + config.initial_cargo = Config::path_from_python("CARGO"); | |
50 | ||
51 | config | |
52 | } | |
53 | -- | |
54 | 2.17.1 | |
55 |