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 be9959d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 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 @@ -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");
Expand Down

0 comments on commit be9959d

Please sign in to comment.