about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/bootstrap/cc_detect.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/bootstrap/cc_detect.rs b/src/bootstrap/cc_detect.rs
index d50e4cf5269..e750c2963dd 100644
--- a/src/bootstrap/cc_detect.rs
+++ b/src/bootstrap/cc_detect.rs
@@ -129,7 +129,8 @@ pub fn find(build: &mut Build) {
             set_compiler(&mut cfg, Language::CPlusPlus, target, config, build);
             true
         } else {
-            false
+            // Use an auto-detected compiler (or one configured via `CXX_target_triple` env vars).
+            cfg.try_get_compiler().is_ok()
         };
 
         // for VxWorks, record CXX compiler which will be used in lib.rs:linker()