Skip to content

Commit

Permalink
Use specified compiler in is_flag_supported
Browse files Browse the repository at this point in the history
Use the compiler specified instead of the default one to test whether a
flag can be accepted.
Fixes rust-lang#675.
  • Loading branch information
Ast-x64 committed Oct 29, 2022
1 parent 00befe7 commit 160d39e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,9 @@ impl Build {
.debug(false)
.cpp(self.cpp)
.cuda(self.cuda);
if let Some(ref c) = self.compiler {
cfg.compiler(c.clone());
}
let mut compiler = cfg.try_get_compiler()?;

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

0 comments on commit 160d39e

Please sign in to comment.