about summary refs log tree commit diff
path: root/src/bootstrap/test.rs
diff options
context:
space:
mode:
authorMichael Woerister <michaelwoerister@posteo>2019-05-27 15:09:26 +0200
committerMichael Woerister <michaelwoerister@posteo>2019-05-27 16:40:00 +0200
commit577ea539dc4a264b480404700a2463e657c09c87 (patch)
treed0b31b0b265430534d177c8a9ef99d14a3f0110b /src/bootstrap/test.rs
parent48b9896eebff639f794f2a67532c741eb1e3b79f (diff)
downloadrust-577ea539dc4a264b480404700a2463e657c09c87.tar.gz
rust-577ea539dc4a264b480404700a2463e657c09c87.zip
Only build clang_rt when RUSTBUILD_FORCE_CLANG_BASED_TESTS is set.
Diffstat (limited to 'src/bootstrap/test.rs')
-rw-r--r--src/bootstrap/test.rs21
1 files changed, 3 insertions, 18 deletions
diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs
index 05b3ce6bc89..9d0aa09f15c 100644
--- a/src/bootstrap/test.rs
+++ b/src/bootstrap/test.rs
@@ -1143,24 +1143,9 @@ impl Step for Compiletest {
             }
         }
 
-        if let Some(var) = env::var_os("RUSTBUILD_FORCE_CLANG_BASED_TESTS") {
-            match &var.to_string_lossy().to_lowercase()[..] {
-                "1" | "yes" | "on" => {
-                    assert!(builder.config.lldb_enabled,
-                        "RUSTBUILD_FORCE_CLANG_BASED_TESTS needs Clang/LLDB to \
-                         be built.");
-                    let clang_exe = builder.llvm_out(target).join("bin").join("clang");
-                    cmd.arg("--run-clang-based-tests-with").arg(clang_exe);
-                }
-                "0" | "no" | "off" => {
-                    // Nothing to do.
-                }
-                other => {
-                    // Let's make sure typos don't get unnoticed
-                    panic!("Unrecognized option '{}' set in \
-                            RUSTBUILD_FORCE_CLANG_BASED_TESTS", other);
-                }
-            }
+        if util::forcing_clang_based_tests() {
+            let clang_exe = builder.llvm_out(target).join("bin").join("clang");
+            cmd.arg("--run-clang-based-tests-with").arg(clang_exe);
         }
 
         // Get paths from cmd args