Skip to content

Commit c4ec310

Browse files
committed
quickfix: add flag -mno-outline-atomics on aarch64
1 parent 4348694 commit c4ec310

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

libgit2-sys/build.rs

+6
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ fn main() {
3232

3333
let target = env::var("TARGET").unwrap();
3434
let windows = target.contains("windows");
35+
let aarch64 = target.contains("aarch64");
3536
let dst = PathBuf::from(env::var_os("OUT_DIR").unwrap());
3637
let include = dst.join("include");
3738
let mut cfg = cc::Build::new();
@@ -85,6 +86,7 @@ fn main() {
8586
cfg.file("libgit2/src/allocators/failalloc.c");
8687
cfg.file("libgit2/src/allocators/stdalloc.c");
8788

89+
8890
if windows {
8991
add_c_files(&mut cfg, "libgit2/src/win32");
9092
cfg.define("STRSAFE_NO_DEPRECATE", None);
@@ -106,6 +108,10 @@ fn main() {
106108
cfg.define("__EXTENSIONS__", None);
107109
}
108110

111+
if aarch64 {
112+
cfg.flag("-mno-outline-atomics");
113+
}
114+
109115
let mut features = String::new();
110116

111117
features.push_str("#ifndef INCLUDE_features_h\n");

0 commit comments

Comments
 (0)