Skip to content

Commit

Permalink
refactor: Add OS check to build flag to make it a bit more robust. Us…
Browse files Browse the repository at this point in the history
…ing a user provided ENV variable for "extra build flags" may be a better long term solution.
  • Loading branch information
John Smith committed Jan 24, 2025
1 parent 7fcb107 commit e4fe2d7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pqcrypto-internals/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,12 @@ fn main() {
.compile("keccak4x");
println!("cargo:rustc-link-lib=keccak4x")
} else if target_arch == "aarch64" && target_env != "msvc" {
let arch_flag = match target_os.as_str() {
"ios" => "-march=armv8-a+sha3",
_ => "-march=armv8-a",
};
builder
.flag("-march=armv8-a+sha3")
.flag(arch_flag)
.file(cfiledir.join("keccak2x").join("fips202x2.c"))
.file(cfiledir.join("keccak2x").join("feat.S"))
.compile("keccak2x");
Expand Down

0 comments on commit e4fe2d7

Please sign in to comment.