Skip to content

Commit 00b6015

Browse files
committed
rustbuild: fix default value for cxx
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
1 parent 59eac97 commit 00b6015

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/bootstrap/cc_detect.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,9 @@ pub fn find(build: &mut Build) {
9999

100100
// If we use llvm-libunwind, we will need a C++ compiler as well for all targets
101101
// We'll need one anyways if the target triple is also a host triple
102-
cfg.cpp(true);
102+
let mut cfg = cc::Build::new();
103+
cfg.cargo_metadata(false).opt_level(2).warnings(false).debug(false).cpp(true)
104+
.target(&target).host(&build.build);
103105
if let Some(cxx) = config.and_then(|c| c.cxx.as_ref()) {
104106
cfg.compiler(cxx);
105107
} else {

0 commit comments

Comments
 (0)