Skip to content

Commit d292e12

Browse files
compiletest: Clear RUSTFLAGS env-var for run-make tests.
1 parent 5f118b9 commit d292e12

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/tools/compiletest/src/runtest.rs

+4
Original file line numberDiff line numberDiff line change
@@ -2175,6 +2175,10 @@ actual:\n\
21752175
.env("LLVM_COMPONENTS", &self.config.llvm_components)
21762176
.env("LLVM_CXXFLAGS", &self.config.llvm_cxxflags);
21772177

2178+
// We don't want RUSTFLAGS set from the outside to interfere with
2179+
// compiler flags set in the test cases:
2180+
cmd.env_remove("RUSTFLAGS");
2181+
21782182
if self.config.target.contains("msvc") {
21792183
// We need to pass a path to `lib.exe`, so assume that `cc` is `cl.exe`
21802184
// and that `lib.exe` lives next to it.

0 commit comments

Comments
 (0)