diff options
| -rw-r--r-- | src/bootstrap/cc_detect.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/bootstrap/cc_detect.rs b/src/bootstrap/cc_detect.rs index 7cdc835f228..dc7287ee301 100644 --- a/src/bootstrap/cc_detect.rs +++ b/src/bootstrap/cc_detect.rs @@ -99,7 +99,9 @@ pub fn find(build: &mut Build) { // If we use llvm-libunwind, we will need a C++ compiler as well for all targets // We'll need one anyways if the target triple is also a host triple - cfg.cpp(true); + let mut cfg = cc::Build::new(); + cfg.cargo_metadata(false).opt_level(2).warnings(false).debug(false).cpp(true) + .target(&target).host(&build.build); if let Some(cxx) = config.and_then(|c| c.cxx.as_ref()) { cfg.compiler(cxx); } else { |
