From be9959de3d7495d81a5463d1ba07757801c5c5dd Mon Sep 17 00:00:00 2001 From: Tami <65782666+tami5@users.noreply.github.com> Date: Thu, 14 Oct 2021 05:24:24 +0300 Subject: [PATCH] quickfix: add flag -mno-outline-atomics on aarch64 --- libgit2-sys/build.rs | 5 +++++ 1 file changed, 5 insertions(+) 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");