Skip to content

Commit cbd247a

Browse files
committed
Use specified compiler in is_flag_supported
Use the compiler specified instead of the default one to test whether a flag can be accepted. Fixes #675.
1 parent fba7fed commit cbd247a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -475,6 +475,9 @@ impl Build {
475475
.debug(false)
476476
.cpp(self.cpp)
477477
.cuda(self.cuda);
478+
if let Some(ref c) = self.compiler {
479+
cfg.compiler(c.clone());
480+
}
478481
let mut compiler = cfg.try_get_compiler()?;
479482

480483
// Clang uses stderr for verbose output, which yields a false positive

0 commit comments

Comments
 (0)