Skip to content

Commit

Permalink
AWS-LC now requires SSE2 on x86
Browse files Browse the repository at this point in the history
  • Loading branch information
justsmth committed Sep 17, 2024
1 parent 6c480f4 commit a87fd31
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions aws-lc-sys/builder/cc_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,11 @@ impl CcBuilder {
.define("BORINGSSL_PREFIX", prefix.as_str());
}

let compiler = cc_build.get_compiler();
if target_arch() == "x86" && (compiler.is_like_clang() || compiler.is_like_gnu()) {
cc_build.flag_if_supported("-msse2");
}

let opt_level = cargo_env("OPT_LEVEL");
match opt_level.as_str() {
"0" | "1" | "2" => {}
Expand Down

0 comments on commit a87fd31

Please sign in to comment.