-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TO REVERT: temporarily add a patch for rustc
- Loading branch information
Showing
1 changed file
with
27 additions
and
0 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
0001-Allow-overwriting-the-sysroot-compile-flag-via-rustc.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
From 8d5e85607d3d52f920990334ae1cfa9798ad9259 Mon Sep 17 00:00:00 2001 | ||
From: Antoni Boucher <[email protected]> | ||
Date: Thu, 8 Jun 2023 17:27:34 -0400 | ||
Subject: [PATCH] Allow overwriting the sysroot compile flag via --rustc-args | ||
|
||
--- | ||
src/tools/compiletest/src/runtest.rs | 4 +++- | ||
1 file changed, 3 insertions(+), 1 deletion(-) | ||
|
||
diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs | ||
index 6582b534488..d16a7d66154 100644 | ||
--- a/src/tools/compiletest/src/runtest.rs | ||
+++ b/src/tools/compiletest/src/runtest.rs | ||
@@ -1951,7 +1951,9 @@ fn make_compile_args( | ||
rustc.arg("-Ztranslate-remapped-path-to-local-path=no"); | ||
|
||
// Optionally prevent default --sysroot if specified in test compile-flags. | ||
- if !self.props.compile_flags.iter().any(|flag| flag.starts_with("--sysroot")) { | ||
+ if !self.props.compile_flags.iter().any(|flag| flag.starts_with("--sysroot")) | ||
+ && !self.config.host_rustcflags.iter().any(|flag| flag == "--sysroot") | ||
+ { | ||
// In stage 0, make sure we use `stage0-sysroot` instead of the bootstrap sysroot. | ||
rustc.arg("--sysroot").arg(&self.config.sysroot_base); | ||
} | ||
-- | ||
2.41.0 | ||
|