Skip to content

Commit

Permalink
Bug fix: cross build aarch64 with simd-accel
Browse files Browse the repository at this point in the history
  • Loading branch information
kings-way committed May 24, 2022
1 parent d93f465 commit a51ff4e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,10 @@ fn compile_simd_c() {
Err(_error) => {
// On x86-64 enabling Haswell architecture unlocks useful instructions and improves performance
// dramatically while allowing it to run ony modern CPU.
#[cfg(target_arch = "x86_64")]
build.flag(&"-march=haswell");
match env::var("CARGO_CFG_TARGET_ARCH").unwrap().as_str(){
"x86_64" => { build.flag(&"-march=haswell"); },
_ => ()
}
}
}

Expand Down

0 comments on commit a51ff4e

Please sign in to comment.