unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
blob e8484903e5c45e38f0145a5254d369c68c8b728d 1978 bytes (raw)
name: gnu/packages/patches/rust-bootstrap-stage0-test.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
 
Bootstrap tests failed with local stage0 cargo and rustc
Backported changes from https://github.com/rust-lang/rust/pull/51977

From 0834d9d771e912f51deca6c25699e44734624546 Mon Sep 17 00:00:00 2001
From: Nikolai Merinov <nikolai.merinov@member.fsf.org>
Date: Mon, 2 Jul 2018 01:45:35 +0500
Subject: [PATCH] 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.
---
 src/bootstrap/bootstrap.py | 2 ++
 src/bootstrap/config.rs    | 6 ++----
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py
index 487440becf..1701f7b83a 100644
--- a/src/bootstrap/bootstrap.py
+++ b/src/bootstrap/bootstrap.py
@@ -788,6 +788,8 @@ def bootstrap(help_triggered):
     env["BOOTSTRAP_PARENT_ID"] = str(os.getpid())
     env["BOOTSTRAP_PYTHON"] = sys.executable
     env["BUILD_DIR"] = build.build_dir
+    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 6dd6291be2..d1a0deb583 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;
@@ -362,9 +361,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
     }
-- 
2.17.1


debug log:

solving e8484903e ...
found e8484903e in https://git.savannah.gnu.org/cgit/guix.git

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).