Skip to content

Commit 8560b07

Browse files
committed
TO REVERT: temporarily add a patch for rustc
1 parent 45bca00 commit 8560b07

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
From 8d5e85607d3d52f920990334ae1cfa9798ad9259 Mon Sep 17 00:00:00 2001
2+
From: Antoni Boucher <[email protected]>
3+
Date: Thu, 8 Jun 2023 17:27:34 -0400
4+
Subject: [PATCH] Allow overwriting the sysroot compile flag via --rustc-args
5+
6+
---
7+
src/tools/compiletest/src/runtest.rs | 4 +++-
8+
1 file changed, 3 insertions(+), 1 deletion(-)
9+
10+
diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs
11+
index 6582b534488..d16a7d66154 100644
12+
--- a/src/tools/compiletest/src/runtest.rs
13+
+++ b/src/tools/compiletest/src/runtest.rs
14+
@@ -1951,7 +1951,9 @@ fn make_compile_args(
15+
rustc.arg("-Ztranslate-remapped-path-to-local-path=no");
16+
17+
// Optionally prevent default --sysroot if specified in test compile-flags.
18+
- if !self.props.compile_flags.iter().any(|flag| flag.starts_with("--sysroot")) {
19+
+ if !self.props.compile_flags.iter().any(|flag| flag.starts_with("--sysroot"))
20+
+ && !self.config.host_rustcflags.iter().any(|flag| flag == "--sysroot")
21+
+ {
22+
// In stage 0, make sure we use `stage0-sysroot` instead of the bootstrap sysroot.
23+
rustc.arg("--sysroot").arg(&self.config.sysroot_base);
24+
}
25+
--
26+
2.41.0
27+

0 commit comments

Comments
 (0)