about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorTomasz Miąsko <tomasz.miasko@gmail.com>2020-10-29 00:00:00 +0000
committerTomasz Miąsko <tomasz.miasko@gmail.com>2020-10-29 18:09:53 +0100
commit4fc21689d8cfd43a9c5d8a682f54906d326eb5cd (patch)
treefa9b3cd52e8ca8a681b9f03941ad171ea39890d1 /src
parent79cc5099b1825dae5507e74a09b6f6eb913667c8 (diff)
downloadrust-4fc21689d8cfd43a9c5d8a682f54906d326eb5cd.tar.gz
rust-4fc21689d8cfd43a9c5d8a682f54906d326eb5cd.zip
Add support for rustc-env and unset-rustc-env for aux-builds
Diffstat (limited to 'src')
-rw-r--r--src/tools/compiletest/src/runtest.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs
index d85558ea2f5..666e5d402ef 100644
--- a/src/tools/compiletest/src/runtest.rs
+++ b/src/tools/compiletest/src/runtest.rs
@@ -1775,6 +1775,11 @@ impl<'test> TestCx<'test> {
         let mut aux_rustc =
             aux_cx.make_compile_args(input_file, aux_output, EmitMetadata::No, AllowUnused::No);
 
+        for key in &aux_props.unset_rustc_env {
+            aux_rustc.env_remove(key);
+        }
+        aux_rustc.envs(aux_props.rustc_env.clone());
+
         let (dylib, crate_type) = if aux_props.no_prefer_dynamic {
             (true, None)
         } else if self.config.target.contains("cloudabi")