mirror of
https://github.com/zen-browser/desktop.git
synced 2025-09-05 19:08:18 +00:00
Update mozconfig
Grouped related options for better organization, Added comments and cleaned up whitespace to enhance readability. Signed-off-by: Cristian Cezar Moisés <86272521+cristiancmoises@users.noreply.github.com>
This commit is contained in:

committed by
GitHub

parent
644baca439
commit
89d8d11db3
@@ -1,24 +1,25 @@
|
||||
|
||||
# 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
|
||||
export CXX="$HOME"/.mozbuild/clang/bin/clang++
|
||||
export CC="$HOME/.mozbuild/clang/bin/clang"
|
||||
export CXX="$HOME/.mozbuild/clang/bin/clang++"
|
||||
else
|
||||
export CC=clang
|
||||
export CXX=clang++
|
||||
fi
|
||||
|
||||
if test "$ZEN_RELEASE"; then
|
||||
|
||||
# Disable DMD and ELF hacks, enable linker lld
|
||||
ac_add_options --disable-dmd
|
||||
ac_add_options --enable-linker=lld
|
||||
ac_add_options --disable-elf-hack
|
||||
|
||||
ac_add_options --disable-necko-wifi
|
||||
|
||||
# Stripping options for release builds
|
||||
ac_add_options --enable-install-strip
|
||||
ac_add_options --enable-strip
|
||||
export STRIP_FLAGS="--strip-debug --strip-unneeded"
|
||||
|
||||
# Using sccache if available
|
||||
if [ -f /home/runner/.mozbuild/sccache/sccache ]; then
|
||||
mk_add_options 'export RUSTC_WRAPPER=/home/runner/.mozbuild/sccache/sccache'
|
||||
mk_add_options 'export CCACHE_CPP2=yes'
|
||||
@@ -26,10 +27,12 @@ if test "$ZEN_RELEASE"; then
|
||||
mk_add_options 'export SCCACHE_GHA_ENABLED=on'
|
||||
fi
|
||||
|
||||
# Enable Profile Guided Optimization
|
||||
export MOZ_PGO=1
|
||||
ac_add_options MOZ_PGO=1
|
||||
|
||||
if test "$SURFER_COMPAT" = "true"; then
|
||||
# Optimization flags for SURFER_COMPAT
|
||||
ac_add_options --enable-optimize="-O3 -march=x86-64"
|
||||
|
||||
export CFLAGS="$CFLAGS -O3 -ffp-contract=fast -march=x86-64"
|
||||
@@ -38,20 +41,23 @@ if test "$ZEN_RELEASE"; then
|
||||
export LDFLAGS="$LDFLAGS -Wl,-O3 -Wl,-mllvm,-fp-contract=fast -march=x86-64"
|
||||
export RUSTFLAGS="$RUSTFLAGS -C target-cpu=x86-64 -C codegen-units=1 -Clink-args=--icf=safe"
|
||||
else
|
||||
# Optimization flags for general release
|
||||
ac_add_options --enable-wasm-avx
|
||||
ac_add_options --enable-optimize="-O3 -march=x86-64-v3 -msse3 -mssse3 -msse4.1 -msse4.2 -mavx -maes -mpopcnt -mpclmul"
|
||||
|
||||
export CFLAGS="$CFLAGS -O3 -ffp-contract=fast -march=x86-64-v3 -msse3 -mssse3 -msse4.1 -msse4.2 -mavx -mavx2 -mfma -maes -mpopcnt -mpclmul"
|
||||
export CFLAGS="$CFLAGS -O3 -ffp-contract=fast -march=x86-64-v3 -msse3 -mssse3 -msse4.1 -msse4.2 -mavx -mavx2 -mfma -maes -mpopcnt -mpclmul"
|
||||
export CPPFLAGS="$CPPFLAGS -O3 -ffp-contract=fast -march=x86-64-v3 -msse3 -mssse3 -msse4.1 -msse4.2 -mavx -mavx2 -mfma -maes -mpopcnt -mpclmul"
|
||||
export CXXFLAGS="$CXXFLAGS -O3 -flto=thin -ffp-contract=fast -march=x86-64-v3 -msse3 -mssse3 -msse4.1 -msse4.2 -mavx -mavx2 -mfma -maes -mpopcnt -mpclmul"
|
||||
export LDFLAGS="$LDFLAGS -Wl,-O3 -Wl,-mllvm,-fp-contract=fast -march=x86-64-v3"
|
||||
export RUSTFLAGS="$RUSTFLAGS -C target-cpu=x86-64-v3 -C target-feature=+sse4.1 -C target-feature=+avx2 -C codegen-units=1 -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"
|
||||
fi
|
||||
|
||||
# Common options
|
||||
ac_add_options --target=x86_64-pc-linux
|
||||
|
||||
ac_add_options --enable-alsa
|
||||
ac_add_options --enable-pulseaudio
|
||||
|
Reference in New Issue
Block a user