Skip to content

Commit

Permalink
quickfix: add flag -mno-outline-atomics on aarch64
Browse files Browse the repository at this point in the history
  • Loading branch information
kkharji committed Oct 14, 2021
1 parent 4348694 commit c4ec310
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions libgit2-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -85,6 +86,7 @@ fn main() {
cfg.file("libgit2/src/allocators/failalloc.c");
cfg.file("libgit2/src/allocators/stdalloc.c");


if windows {
add_c_files(&mut cfg, "libgit2/src/win32");
cfg.define("STRSAFE_NO_DEPRECATE", None);
Expand All @@ -106,6 +108,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");
Expand Down

0 comments on commit c4ec310

Please sign in to comment.