about summary refs log tree commit diff
path: root/src/bootstrap
diff options
context:
space:
mode:
authorMarc-Antoine Perennou <Marc-Antoine@Perennou.com>2019-06-13 10:04:42 +0200
committerMarc-Antoine Perennou <Marc-Antoine@Perennou.com>2019-06-13 10:05:47 +0200
commit00b6015c078fc3ab76d4ca9ab869c6f0e5b8a1f6 (patch)
tree7e774eae8a0364965d270ff7a9950ec258e01f56 /src/bootstrap
parent59eac97869eed3a7aa41a96c92021194ddca99f9 (diff)
downloadrust-00b6015c078fc3ab76d4ca9ab869c6f0e5b8a1f6.tar.gz
rust-00b6015c078fc3ab76d4ca9ab869c6f0e5b8a1f6.zip
rustbuild: fix default value for cxx
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
Diffstat (limited to 'src/bootstrap')
-rw-r--r--src/bootstrap/cc_detect.rs4
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 {