diff --git a/arm/build/config/compiler/BUILD.gn b/arm/build/config/compiler/BUILD.gn index f1cd7d90..2a554944 100644 --- a/arm/build/config/compiler/BUILD.gn +++ b/arm/build/config/compiler/BUILD.gn @@ -620,7 +620,7 @@ config("compiler") { } } - if (use_avx2 || use_avx512 || current_cpu == "arm64") { + if (use_avx2 || use_avx512 || current_cpu == "arm64" || is_mac) { if (is_win) { cflags += [ "/clang:-ffp-contract=fast" ] } else { @@ -2662,7 +2662,7 @@ if (is_win) { common_optimize_on_cflags += [ "-mtune=cortex-a72", ] } if (is_mac) { - common_optimize_on_cflags += [ "-march=armv8.3-a+simd", ] + common_optimize_on_cflags += [ "-march=armv8.3-a+simd+crypto", ] } } @@ -2723,7 +2723,7 @@ if (is_win) { if (current_cpu == "arm64") { common_optimize_on_ldflags += [ "-march=armv8-a+simd", ] if (is_mac) { - common_optimize_on_ldflags += [ "-march=armv8.3-a+simd", ] + common_optimize_on_ldflags += [ "-march=armv8.3-a+simd+crypto", ] } } diff --git a/other/Mac/mac_ARM_args.gn b/other/Mac/mac_ARM_args.gn index 2da76651..832e2880 100644 --- a/other/Mac/mac_ARM_args.gn +++ b/other/Mac/mac_ARM_args.gn @@ -1,3 +1,5 @@ +use_sse3 = false + # use_polly = true target_os = "mac" target_cpu = "arm64" diff --git a/src/build/config/compiler/BUILD.gn b/src/build/config/compiler/BUILD.gn index f1cd7d90..2a554944 100644 --- a/src/build/config/compiler/BUILD.gn +++ b/src/build/config/compiler/BUILD.gn @@ -620,7 +620,7 @@ config("compiler") { } } - if (use_avx2 || use_avx512 || current_cpu == "arm64") { + if (use_avx2 || use_avx512 || current_cpu == "arm64" || is_mac) { if (is_win) { cflags += [ "/clang:-ffp-contract=fast" ] } else { @@ -2662,7 +2662,7 @@ if (is_win) { common_optimize_on_cflags += [ "-mtune=cortex-a72", ] } if (is_mac) { - common_optimize_on_cflags += [ "-march=armv8.3-a+simd", ] + common_optimize_on_cflags += [ "-march=armv8.3-a+simd+crypto", ] } } @@ -2723,7 +2723,7 @@ if (is_win) { if (current_cpu == "arm64") { common_optimize_on_ldflags += [ "-march=armv8-a+simd", ] if (is_mac) { - common_optimize_on_ldflags += [ "-march=armv8.3-a+simd", ] + common_optimize_on_ldflags += [ "-march=armv8.3-a+simd+crypto", ] } } diff --git a/src/build/config/mac/BUILD.gn b/src/build/config/mac/BUILD.gn index 67bb328a..bb24b7e5 100644 --- a/src/build/config/mac/BUILD.gn +++ b/src/build/config/mac/BUILD.gn @@ -40,8 +40,8 @@ config("compiler") { if (current_cpu == "arm64") { # Alex313031 TODO: Possibly use -mcpu here? - cflags += [ "-march=armv8.3-a+simd", "-mtune=apple-m1" ] - ldflags += [ "-march=armv8.3-a+simd", "-mtune=apple-m1" ] + cflags += [ "-march=armv8.3-a+simd+crypto", "-mtune=apple-m1" ] + ldflags += [ "-march=armv8.3-a+simd+crypto", "-mtune=apple-m1" ] } if (current_cpu == "x64") {