From 577ea539dc4a264b480404700a2463e657c09c87 Mon Sep 17 00:00:00 2001 From: Michael Woerister Date: Mon, 27 May 2019 15:09:26 +0200 Subject: Only build clang_rt when RUSTBUILD_FORCE_CLANG_BASED_TESTS is set. --- src/bootstrap/test.rs | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) (limited to 'src/bootstrap/test.rs') 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 -- cgit 1.4.1-3-g733a5