diff --git a/configs/common/mozconfig b/configs/common/mozconfig index 73d23dc3c..f1a14d679 100644 --- a/configs/common/mozconfig +++ b/configs/common/mozconfig @@ -53,11 +53,6 @@ if test "$ZEN_RELEASE"; then # Done by vlad, if something fails, it's his fault ac_add_options --disable-default-browser-agent - if ! test "$ZEN_DISABLE_LTO"; then - export MOZ_LTO=cross,thin - ac_add_options --enable-lto=cross,thin - fi - ac_add_options --enable-jemalloc mk_add_options MOZILLA_OFFICIAL=1 diff --git a/configs/linux/mozconfig b/configs/linux/mozconfig index 1693cc187..12d7d8c56 100644 --- a/configs/linux/mozconfig +++ b/configs/linux/mozconfig @@ -18,6 +18,11 @@ if test "$SURFER_COMPAT" = "x86_64"; then # Optimization flags for SURFER_COMPAT ac_add_options --enable-optimize="-O3 -march=x86-64" + if ! test "$ZEN_DISABLE_LTO"; then + export MOZ_LTO=cross,thin + ac_add_options --enable-lto=cross,thin + fi + export CFLAGS="$CFLAGS -O3 -ffp-contract=fast -march=x86-64" export CPPFLAGS="$CPPFLAGS -O3 -ffp-contract=fast -march=x86-64" export CXXFLAGS="$CXXFLAGS -O3 -flto=thin -ffp-contract=fast -march=x86-64" @@ -28,6 +33,11 @@ elif test "$SURFER_COMPAT" = "aarch64"; then ac_add_options --enable-optimize="-O3" + if ! test "$ZEN_DISABLE_LTO"; then + export MOZ_LTO=cross,thin + ac_add_options --enable-lto=cross,thin + fi + export CFLAGS="$CFLAGS -O3" export CPPFLAGS="$CPPFLAGS -O3" export CXXFLAGS="$CXXFLAGS -O3" diff --git a/configs/macos/mozconfig b/configs/macos/mozconfig index 17b78d30f..2c3783972 100644 --- a/configs/macos/mozconfig +++ b/configs/macos/mozconfig @@ -11,6 +11,11 @@ ac_add_options MOZ_PGO=1 ac_add_options --enable-clang-plugin +if ! test "$ZEN_DISABLE_LTO"; then + export MOZ_LTO=cross,thin + ac_add_options --enable-lto=cross,thin +fi + if test "$SURFER_COMPAT" = "x86_64"; then ac_add_options --target=x86_64-apple-darwin diff --git a/configs/windows/mozconfig b/configs/windows/mozconfig index 5a81ab212..91c3de471 100644 --- a/configs/windows/mozconfig +++ b/configs/windows/mozconfig @@ -25,6 +25,11 @@ fi ac_add_options --disable-maintenance-service ac_add_options --disable-bits-download +if ! test "$ZEN_DISABLE_LTO"; then + export MOZ_LTO=cross,thin + ac_add_options --enable-lto=cross,thin +fi + if test "$SURFER_COMPAT" = "x86_64"; then ac_add_options --target=x86_64-pc-windows-msvc ac_add_options --enable-eme=widevine