Browse Source

Merge pull request #279 from kornelski/master

Make is_flag_supported public
cl-test
Alex Crichton 7 years ago
committed by GitHub
parent
commit
da1de51564
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      src/lib.rs

9
src/lib.rs

@ -391,7 +391,14 @@ impl Build {
Ok(src)
}
fn is_flag_supported(&self, flag: &str) -> Result<bool, Error> {
/// Run the compiler to test if it accepts the given flag.
///
/// For a convenience method for setting flags conditionally,
/// see `flag_if_supported()`.
///
/// It may return error if it's unable to run the compilier with a test file
/// (e.g. the compiler is missing or a write to the `out_dir` failed).
pub fn is_flag_supported(&self, flag: &str) -> Result<bool, Error> {
let out_dir = self.get_out_dir()?;
let src = self.ensure_check_file()?;
let obj = out_dir.join("flag_check");

Loading…
Cancel
Save