Bug 1927983 - Clean-up in-tree mozconfigs. r=firefox-build-system-reviewers,geckoview-reviewers,sergesanspaille,m_kato

-gline-tables-only is better passed to --enable-debug or
--enable-debug-symbols than via abuse of --enable-optimize.

--enable-optimize was being passed -O2 because passing
-gline-tables-only would have removed optimizations. This has the side
effect of changing the optimization level on macOS, though, so there
we keep the override.

--disable-debug is the default, remove it.
--enable-project=browser is the default, remove it.
--enable-optimize is the default, remove it.
--enable-debug-symbols is the default, remove it.
--disable-sandbox is the default on tsan builds, remove it.
--enable-optimize="-O2 -g" is, essentially, the default, remove it.
--with-android-min-sdk=21 is the default, remove it.

X11 builds only have the X11 headers, so technically speaking the
cairo-gtk3 toolkit is fine because it does the right fallback, but
using cairo-gtk3-x11-only is more explicit and would avoid surprises.

MOZ_DEBUG_SYMBOLS has been a no-op for essentially forever.

Differential Revision: https://phabricator.services.mozilla.com/D227311
This commit is contained in:
Mike Hommey 2024-10-31 23:39:04 +00:00
parent 6dd666bde5
commit 8d8376cce5
21 changed files with 15 additions and 54 deletions

View File

@ -1,4 +1,4 @@
ac_add_options --enable-debug
ac_add_options --enable-debug=-gline-tables-only
. $topsrcdir/build/unix/mozconfig.linux32
@ -21,7 +21,6 @@ ac_add_options --disable-jemalloc
# well as for libFuzzer targets. See also bug 1649062.
ac_add_options --disable-crashreporter
ac_add_options --disable-install-strip
ac_add_options --enable-optimize="-O2 -gline-tables-only"
# Need this to prevent name conflicts with the normal nightly build packages
export MOZ_PKG_SPECIAL=fuzzing

View File

@ -1,7 +1,3 @@
# We still need to build with debug symbols
ac_add_options --disable-debug
ac_add_options --enable-optimize="-O2 -g"
# ASan specific options on Linux
ac_add_options --enable-valgrind

View File

@ -1,8 +1,6 @@
. $topsrcdir/build/unix/mozconfig.linux32
# We still need to build with debug symbols
ac_add_options --disable-debug
ac_add_options --enable-optimize="-O2 -gline-tables-only"
ac_add_options --enable-debug-symbols=-gline-tables-only
# Add-on signing is checked but not enforced
MOZ_REQUIRE_SIGNING=

View File

@ -1,4 +1,4 @@
ac_add_options --enable-debug
ac_add_options --enable-debug=-gline-tables-only
. $topsrcdir/build/unix/mozconfig.linux
@ -21,7 +21,6 @@ ac_add_options --disable-jemalloc
# well as for libFuzzer targets. See also bug 1649062.
ac_add_options --disable-crashreporter
ac_add_options --disable-install-strip
ac_add_options --enable-optimize="-O2 -gline-tables-only"
# Need this to prevent name conflicts with the normal nightly build packages
export MOZ_PKG_SPECIAL=fuzzing

View File

@ -1,6 +1,4 @@
# We still need to build with debug symbols
ac_add_options --disable-debug
ac_add_options --enable-optimize="-O2 -gline-tables-only"
ac_add_options --enable-debug-symbols=-gline-tables-only
# ASan specific options on Linux
ac_add_options --enable-valgrind

View File

@ -1,8 +1,6 @@
. "$topsrcdir/browser/config/mozconfigs/linux64/common-opt"
# We still need to build with debug symbols
ac_add_options --disable-debug
ac_add_options --enable-optimize="-O2 -gline-tables-only"
ac_add_options --enable-debug-symbols=-gline-tables-only
# ASan specific options on Linux
ac_add_options --enable-valgrind

View File

@ -1,6 +1,4 @@
# We still need to build with debug symbols
ac_add_options --disable-debug
ac_add_options --enable-optimize="-O2 -gline-tables-only"
ac_add_options --enable-debug-symbols=-gline-tables-only
#add-on signing is checked but not enforced
MOZ_REQUIRE_SIGNING=

View File

@ -1,5 +1,3 @@
# We still need to build with debug symbols
ac_add_options --disable-debug
ac_add_options --disable-optimize
#add-on signing is checked but not enforced

View File

@ -1,8 +1,7 @@
. "$topsrcdir/build/unix/mozconfig.afl"
# We still need to build with debug symbols
ac_add_options --disable-debug
ac_add_options --enable-optimize="-O2 -gline-tables-only"
ac_add_options --enable-debug-symbols=-gline-tables-only
#add-on signing is checked but not enforced
MOZ_REQUIRE_SIGNING=

View File

@ -1,6 +1,4 @@
# We still need to build with debug symbols
ac_add_options --disable-debug
ac_add_options --enable-optimize="-O2 -gline-tables-only"
ac_add_options --enable-debug-symbols=-gline-tables-only
. $topsrcdir/build/unix/mozconfig.linux
. $topsrcdir/build/unix/mozconfig.tsan

View File

@ -1,7 +1,5 @@
ac_add_options --enable-project=browser
# We still need to build with debug symbols
ac_add_options --disable-debug
ac_add_options --enable-optimize="-O2"
ac_add_options --enable-optimize=-O2
ac_add_options --enable-debug-symbols=-gline-tables-only
. $topsrcdir/build/unix/mozconfig.asan

View File

@ -2,9 +2,6 @@ MOZ_AUTOMATION_BUILD_SYMBOLS=0
. $topsrcdir/build/macosx/mozconfig.common
ac_add_options --disable-debug
ac_add_options --enable-optimize
ac_add_options --enable-clang-plugin
. "$topsrcdir/build/mozconfig.common.override"

View File

@ -2,8 +2,7 @@
. "$topsrcdir/browser/config/mozconfigs/common"
. "$topsrcdir/browser/config/mozconfigs/win64/common-win64"
ac_add_options --disable-debug
ac_add_options --enable-optimize="-O2 -gline-tables-only"
ac_add_options --enable-debug-symbols=-gline-tables-only
. "$topsrcdir/build/win64/mozconfig.asan"

View File

@ -2,8 +2,7 @@
. "$topsrcdir/browser/config/mozconfigs/win64/common-win64"
. "$topsrcdir/browser/config/mozconfigs/win64/common-opt"
ac_add_options --disable-debug
ac_add_options --enable-optimize="-O2 -gline-tables-only"
ac_add_options --enable-debug-symbols=-gline-tables-only
ac_add_options --enable-address-sanitizer-reporter
. "$topsrcdir/build/win64/mozconfig.asan"

View File

@ -6,8 +6,6 @@ export LLVM_SYMBOLIZER="$MOZ_FETCHES_DIR/llvm-symbolizer/bin/llvm-symbolizer"
ac_add_options --enable-address-sanitizer
# Mandatory options required for ASan builds (both on Linux and Mac)
export MOZ_DEBUG_SYMBOLS=1
ac_add_options --enable-debug-symbols
ac_add_options --disable-install-strip
ac_add_options --disable-jemalloc
ac_add_options --disable-crashreporter

View File

@ -5,7 +5,7 @@ base-toolchains*)
# We don't build against wayland for base-toolchain builds.
;;
x11)
ac_add_options --enable-default-toolkit=cairo-gtk3
ac_add_options --enable-default-toolkit=cairo-gtk3-x11-only
;;
*)
ac_add_options --enable-default-toolkit=cairo-gtk3-x11-wayland

View File

@ -3,15 +3,10 @@ export LLVM_SYMBOLIZER="$MOZ_FETCHES_DIR/llvm-symbolizer/bin/llvm-symbolizer"
# Enable TSan specific code and build workarounds
ac_add_options --enable-thread-sanitizer
# The ThreadSanitizer is not compatible with sandboxing
# (see bug 1182565)
ac_add_options --disable-sandbox
# These are required by TSan
ac_add_options --disable-jemalloc
ac_add_options --disable-crashreporter
ac_add_options --disable-profiling
# Keep symbols to symbolize TSan traces
ac_add_options --enable-debug-symbols
ac_add_options --disable-install-strip

View File

@ -13,7 +13,6 @@ fi
ac_add_options --enable-address-sanitizer
# Mandatory options required for ASan builds
ac_add_options --enable-debug-symbols
ac_add_options --disable-jemalloc
ac_add_options --disable-crashreporter
ac_add_options --disable-profiling

View File

@ -7,8 +7,6 @@
# <https://wiki.mozilla.org/Javascript:SpiderMonkey:ExactStackRooting>.
ac_add_options --enable-ctypes
ac_add_options --enable-optimize
ac_add_options --disable-debug
ac_add_options --enable-project=js
ac_add_options --enable-nspr-build
ac_add_options --disable-jemalloc

View File

@ -4,7 +4,6 @@
ac_add_options --enable-debug
# Android
ac_add_options --with-android-min-sdk=21
ac_add_options --target=x86_64-linux-android
export MOZILLA_OFFICIAL=1
@ -12,4 +11,4 @@ export MOZ_ANDROID_CONTENT_SERVICE_ISOLATED_PROCESS=1
ac_add_options --with-branding=mobile/android/branding/nightly
. "$topsrcdir/mobile/android/config/mozconfigs/common.override"
. "$topsrcdir/mobile/android/config/mozconfigs/common.override"

View File

@ -3,9 +3,7 @@
# Remove unwanted environment variables from the 'nightly' mozconfig.
unset MOZ_ANDROID_POCKET
# We still need to build with debug symbols
ac_add_options --disable-debug
ac_add_options --enable-optimize="-O2 -gline-tables-only"
ac_add_options --enable-debug-symbols=-gline-tables-only
. $topsrcdir/build/unix/mozconfig.asan
ac_add_options --disable-elf-hack