chore: Added release checks to the mozconfig, b=no-bug, c=common, configs

This commit is contained in:
Mr. M
2025-08-09 13:33:23 +02:00
parent daae9ac98e
commit 2c5a7612f8
4 changed files with 77 additions and 74 deletions

View File

@@ -1,3 +1,7 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# Browser branding
ac_add_options --with-app-name=${binName}
ac_add_options --with-app-basename=Zen

View File

@@ -1,3 +1,7 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# Setting the compiler based on the existence of clang bin directory
if test -d "$HOME/.mozbuild/clang/bin"; then
export CC="$HOME/.mozbuild/clang/bin/clang"
@@ -7,48 +11,40 @@ else
export CXX=clang++
fi
if test "$SURFER_COMPAT" = "x86_64"; then
ac_add_options --target=x86_64-pc-linux
ac_add_options --enable-eme=widevine
if test "$ZEN_RELEASE"; then
if test "$SURFER_COMPAT" = "x86_64"; then
ac_add_options --target=x86_64-pc-linux
ac_add_options --enable-eme=widevine
# Enable Profile Guided Optimization
if test "$ZEN_GA_DISABLE_PGO"; then
export ZEN_DUMMY=1
else
export MOZ_PGO=1
ac_add_options MOZ_PGO=1
# Enable Profile Guided Optimization
if test "$ZEN_GA_DISABLE_PGO"; then
export ZEN_DUMMY=1
else
export MOZ_PGO=1
ac_add_options MOZ_PGO=1
fi
# Optimization flags for SURFER_COMPAT
ac_add_options --enable-optimize="-O3 -w -ftree-vectorize -mfpmath=sse -mprfchw -msse3 -mcx16 -msahf"
export LDFLAGS="$LDFLAGS -Wl,-O3"
export RUSTFLAGS="$RUSTFLAGS -Clink-args=--icf=safe"
elif test "$SURFER_COMPAT" = "aarch64"; then
ac_add_options --target=aarch64-linux-gnu
ac_add_options --enable-optimize="-O3"
# override LTO settings
export MOZ_LTO=cross,thin
ac_add_options --enable-lto=cross,thin
export CFLAGS="$CFLAGS -O3"
export CPPFLAGS="$CPPFLAGS -O3"
export CXXFLAGS="$CXXFLAGS -O3"
export LDFLAGS="$LDFLAGS -Wl,-O3"
export RUSTFLAGS="$RUSTFLAGS -Clink-args=--icf=safe"
fi
# Optimization flags for SURFER_COMPAT
ac_add_options --enable-optimize="-O3 -w -ftree-vectorize -mfpmath=sse -mprfchw -msse3 -mcx16 -msahf"
export LDFLAGS="$LDFLAGS -Wl,-O3"
export RUSTFLAGS="$RUSTFLAGS -Clink-args=--icf=safe"
elif test "$SURFER_COMPAT" = "aarch64"; then
ac_add_options --target=aarch64-linux-gnu
ac_add_options --enable-optimize="-O3"
# override LTO settings
export MOZ_LTO=cross,thin
ac_add_options --enable-lto=cross,thin
export CFLAGS="$CFLAGS -O3"
export CPPFLAGS="$CPPFLAGS -O3"
export CXXFLAGS="$CXXFLAGS -O3"
export LDFLAGS="$LDFLAGS -Wl,-O3"
export RUSTFLAGS="$RUSTFLAGS -Clink-args=--icf=safe"
fi
export VERBOSE=1
# Uncomment if you want to enable Polly optimizations
#export POLLY="-mllvm -polly -mllvm -polly-2nd-level-tiling -mllvm -polly-loopfusion-greedy -mllvm -polly-pattern-matching-based-opts -mllvm -polly-position=before-vectorizer -mllvm -polly-vectorizer=stripmine"
# Common options
ac_add_options --enable-alsa
ac_add_options --enable-pulseaudio
if test "$ZEN_RELEASE"; then
# Disable DMD and ELF hacks, enable linker lld
ac_add_options --disable-dmd
ac_add_options --enable-linker=lld
@@ -60,3 +56,7 @@ if test "$ZEN_RELEASE"; then
ac_add_options --enable-strip
export STRIP_FLAGS="--strip-debug --strip-unneeded"
fi
# Common options
ac_add_options --enable-alsa
ac_add_options --enable-pulseaudio

View File

@@ -1,3 +1,7 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
unset MOZ_STDCXX_COMPAT
ac_add_options --disable-dmd
@@ -15,38 +19,31 @@ if test "$ZEN_RELEASE"; then
export MOZ_PGO=1
ac_add_options MOZ_PGO=1
fi
if test "$SURFER_COMPAT" = "x86_64"; then
ac_add_options --target=x86_64-apple-darwin
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"
else
ac_add_options --enable-clang-plugin
ac_add_options --target=aarch64-apple-darwin
ac_add_options --enable-optimize="-O3 -mcpu=apple-m1 -march=armv8.3-a+simd"
# 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"
fi
fi
if test "$SURFER_COMPAT" = "x86_64"; then
ac_add_options --target=x86_64-apple-darwin
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"
else
ac_add_options --enable-clang-plugin
ac_add_options --target=aarch64-apple-darwin
ac_add_options --enable-optimize="-O3 -mcpu=apple-m1 -march=armv8.3-a+simd"
# 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"
fi
export VERBOSE=1
# Enable polly for macos, since they have a more stable set of GPU drivers,
# unlike Linux, which has a lot of different drivers.
# Edit: let's run some experiments, see if RAM usage lowers significantly
# export POLLY="-mllvm -polly -mllvm -polly-2nd-level-tiling -mllvm -polly-loopfusion-greedy -mllvm -polly-pattern-matching-based-opts -mllvm -polly-position=before-vectorizer -mllvm -polly-vectorizer=stripmine"

View File

@@ -1,3 +1,6 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
if test "$ZEN_CROSS_COMPILING"; then
@@ -53,7 +56,6 @@ elif test "$SURFER_COMPAT" = "aarch64"; then
fi
#export POLLY="-mllvm -polly -mllvm -polly-2nd-level-tiling -mllvm -polly-loopfusion-greedy -mllvm -polly-pattern-matching-based-opts -mllvm -polly-position=before-vectorizer -mllvm -polly-vectorizer=stripmine"
export VERBOSE=1
if test "$ZEN_CROSS_COMPILING"; then
if test "$ZEN_GA_GENERATE_PROFILE"; then