diff --git a/configs/macos/mozconfig b/configs/macos/mozconfig index 0df4c6858..ad0e77fb8 100644 --- a/configs/macos/mozconfig +++ b/configs/macos/mozconfig @@ -29,27 +29,22 @@ if test "$SURFER_COMPAT" = "x86_64"; then if test "$ZEN_RELEASE"; then ac_add_options --enable-wasm-avx ac_add_options --enable-optimize="-march=nehalem -mtune=haswell -O3 -w" - - export CFLAGS="-O3 -march=nehalem" - export CPPFLAGS="-O3 -march=nehalem" - export CXXFLAGS="-O3 -march=nehalem" - export LDFLAGS="-Wl,-O3 -march=nehalem" - export RUSTFLAGS="-Ctarget-cpu=nehalem" fi else ac_add_options --enable-clang-plugin ac_add_options --target=aarch64-apple-darwin if test "$ZEN_RELEASE"; then - ac_add_options --enable-optimize="-O3 -mcpu=apple-m1 -march=armv8.3-a+simd" + ac_add_options --enable-optimize="-O3 -mcpu=apple-m1" # As of Clang 13, the default is -mcpu=apple-m1 when using a aarch64-apple-macos target, # but we're using apple64-apple-darwin, which defaults to -mcpu=apple-a7, which disables # a bunch of # performance-enabling CPU features. - export CFLAGS="-O3 -march=armv8.3-a+simd -mcpu=apple-m1" - export CPPFLAGS="-O3 -march=armv8.3-a+simd -mcpu=apple-m1" - export CXXFLAGS="-O3 -march=armv8.3-a+simd -mcpu=apple-m1" - export LDFLAGS="-Wl,-O3 -march=armv8.3-a+simd -mcpu=apple-m1" - export RUSTFLAGS="-C target-feature=+v8.3a -Ctarget-cpu=apple-m1" + # TODO: We'll want to switch to aarch64-apple-macos eventually. + export CFLAGS="$CFLAGS -mcpu=apple-m1" + export CXXFLAGS="$CXXFLAGS -mcpu=apple-m1" + + # Keep using ld64 on PGO/LTO builds because of performance regressions when using lld. + ac_add_options --enable-linker=ld64 fi fi diff --git a/configs/windows/mozconfig b/configs/windows/mozconfig index df0b0ef71..685d9605b 100644 --- a/configs/windows/mozconfig +++ b/configs/windows/mozconfig @@ -36,8 +36,8 @@ if test "$SURFER_COMPAT" = "x86_64"; then ac_add_options --enable-optimize="-O3 -w -ftree-vectorize -mfpmath=sse -mprfchw -msse3 -mcx16 -msahf" - export LDFLAGS="-Wl,-O3" - export RUSTFLAGS="-Clink-args=--icf=safe" + export LDFLAGS="$LDFLAGS -Wl,-O3" + export RUSTFLAGS="$RUSTFLAGS -Clink-args=--icf=safe" elif test "$SURFER_COMPAT" = "aarch64"; then ac_add_options --target=aarch64-pc-windows-msvc ac_add_options --enable-eme=widevine