diff --git a/libgit2-sys/build.rs b/libgit2-sys/build.rs index 36dc3d9b8f..9da3c183c9 100644 --- a/libgit2-sys/build.rs +++ b/libgit2-sys/build.rs @@ -32,6 +32,7 @@ fn main() { let target = env::var("TARGET").unwrap(); let windows = target.contains("windows"); + let aarch64 = target.contains("aarch64"); let dst = PathBuf::from(env::var_os("OUT_DIR").unwrap()); let include = dst.join("include"); let mut cfg = cc::Build::new(); @@ -106,6 +107,10 @@ fn main() { cfg.define("__EXTENSIONS__", None); } + if aarch64 { + cfg.flag("-mno-outline-atomics"); + } + let mut features = String::new(); features.push_str("#ifndef INCLUDE_features_h\n");