Skip to content
Snippets Groups Projects
Commit 6939a6e0 authored by Enver Balalic's avatar Enver Balalic
Browse files

Use flag_if_supported instead of flag for mno-outline-atomics

The x86 build fails due to unknown flag when using just .flag()
parent a63fb22a
No related branches found
No related tags found
1 merge request!421Use flag_if_supported instead of flag for mno-outline-atomics
...@@ -3,6 +3,7 @@ extern crate cc; ...@@ -3,6 +3,7 @@ extern crate cc;
use std::{env, fs, fs::DirEntry, path::Path}; use std::{env, fs, fs::DirEntry, path::Path};
// include src/header directories that don't start with '_' // include src/header directories that don't start with '_'
fn include_dir(d: &DirEntry) -> bool { fn include_dir(d: &DirEntry) -> bool {
d.metadata().map(|m| m.is_dir()).unwrap_or(false) d.metadata().map(|m| m.is_dir()).unwrap_or(false)
...@@ -59,7 +60,7 @@ fn main() { ...@@ -59,7 +60,7 @@ fn main() {
.flag("-nostdlib") .flag("-nostdlib")
.include(&format!("{}/include", crate_dir)) .include(&format!("{}/include", crate_dir))
.include(&format!("{}/target/include", crate_dir)) .include(&format!("{}/target/include", crate_dir))
.flag("-mno-outline-atomics") .flag_if_supported("-mno-outline-atomics")
.flag("-fno-stack-protector") .flag("-fno-stack-protector")
.flag("-Wno-expansion-to-defined") .flag("-Wno-expansion-to-defined")
.files( .files(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment