[tbb-commits] [tor-browser] 05/74: Base Browser's .mozconfigs.

gitolite role git at cupani.torproject.org
Thu Oct 27 21:21:10 UTC 2022


This is an automated email from the git hooks/post-receive script.

richard pushed a commit to branch tor-browser-102.4.0esr-12.0-2
in repository tor-browser.

commit e9b660ac47c973c79ad4b9d2696d8470e0d6d9df
Author: Pier Angelo Vendrame <pierov at torproject.org>
AuthorDate: Mon May 23 17:01:24 2022 +0200

    Base Browser's .mozconfigs.
---
 browser/config/mozconfigs/base-browser         | 43 ++++++++++++++++++++++
 browser/config/mozconfigs/base-browser-android | 49 ++++++++++++++++++++++++++
 moz.configure                                  |  8 +++++
 mozconfig-android-aarch64                      |  4 +++
 mozconfig-android-all                          | 23 ++++++++++++
 mozconfig-android-armv7                        |  4 +++
 mozconfig-android-x86                          |  4 +++
 mozconfig-android-x86_64                       |  4 +++
 mozconfig-linux-arm                            | 18 ++++++++++
 mozconfig-linux-i686                           |  9 +++++
 mozconfig-linux-x86_64                         |  9 +++++
 mozconfig-linux-x86_64-asan                    | 22 ++++++++++++
 mozconfig-linux-x86_64-dev                     | 13 +++++++
 mozconfig-macos-x86_64                         |  6 ++++
 mozconfig-windows-i686                         | 14 ++++++++
 mozconfig-windows-x86_64                       | 14 ++++++++
 16 files changed, 244 insertions(+)

diff --git a/browser/config/mozconfigs/base-browser b/browser/config/mozconfigs/base-browser
new file mode 100644
index 000000000000..064685670934
--- /dev/null
+++ b/browser/config/mozconfigs/base-browser
@@ -0,0 +1,43 @@
+# Shared build settings and settings to enhance security and privacy.
+
+. $topsrcdir/browser/config/mozconfig
+
+if test -f "$topsrcdir/mozconfig-toolchain"; then
+    . $topsrcdir/mozconfig-toolchain
+fi
+
+mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj- at CONFIG_GUESS@
+
+ac_add_options --enable-official-branding
+export MOZILLA_OFFICIAL=1
+
+ac_add_options --enable-optimize
+ac_add_options --enable-rust-simd
+
+ac_add_options --enable-bundled-fonts
+
+ac_add_options --disable-tests
+ac_add_options --disable-debug
+
+ac_add_options --disable-crashreporter
+# Before removing, please notice that WebRTC does not work on mingw (Bug 1393901)
+ac_add_options --disable-webrtc
+ac_add_options --disable-parental-controls
+# Let's make sure no preference is enabling either Adobe's or Google's CDM.
+ac_add_options --disable-eme
+ac_add_options --enable-proxy-bypass-protection
+# See bugs #30575 and #32418: system policies are harmful either because they
+# could allow proxy bypass, and override a number of other preferences we set
+ac_add_options --disable-system-policies
+
+# See bug #41131
+ac_add_options --disable-backgroundtasks
+
+ac_add_options --enable-base-browser
+
+# Disable telemetry
+ac_add_options MOZ_TELEMETRY_REPORTING=
+
+if test -z "$WASI_SYSROOT"; then
+    ac_add_options --without-wasm-sandboxed-libraries
+fi
diff --git a/browser/config/mozconfigs/base-browser-android b/browser/config/mozconfigs/base-browser-android
new file mode 100644
index 000000000000..78c5e4c3c08e
--- /dev/null
+++ b/browser/config/mozconfigs/base-browser-android
@@ -0,0 +1,49 @@
+export MOZILLA_OFFICIAL=1
+
+ac_add_options --enable-optimize
+ac_add_options --enable-rust-simd
+ac_add_options --enable-official-branding
+
+ac_add_options --enable-application=mobile/android
+
+CC="clang"
+CXX="clang++"
+ac_add_options --with-java-bin-path=$JAVA_HOME/bin
+ac_add_options --with-android-sdk=$ANDROID_HOME
+ac_add_options --with-android-ndk=$ANDROID_NDK_HOME
+ac_add_options --with-android-min-sdk=21
+ac_add_options --with-gradle=$GRADLE_HOME/bin/gradle
+
+# https://bugzilla.mozilla.org/show_bug.cgi?id=1758568
+ac_add_options --enable-minify=properties
+
+ac_add_options --enable-strip
+ac_add_options --enable-install-strip
+ac_add_options --disable-tests
+ac_add_options --disable-debug
+ac_add_options --disable-rust-debug
+
+ac_add_options --disable-updater
+ac_add_options --disable-crashreporter
+ac_add_options --disable-webrtc
+ac_add_options --disable-parental-controls
+
+ac_add_options --enable-proxy-bypass-protection
+ac_add_options --disable-system-policies
+
+ac_add_options --enable-base-browser
+
+# Disable telemetry
+ac_add_options MOZ_TELEMETRY_REPORTING=
+
+if test -n "$LOCAL_DEV_BUILD"; then
+    # You must use the "default" bogus channel for dev builds
+    ac_add_options --enable-update-channel=default
+else
+    # We only use beta GeckoView for now, for official builds
+    ac_add_options --enable-update-channel=beta
+fi
+
+if test -z "$WASI_SYSROOT"; then
+    ac_add_options --without-wasm-sandboxed-libraries
+fi
diff --git a/moz.configure b/moz.configure
index 8b74afbabec1..2997187cfe23 100755
--- a/moz.configure
+++ b/moz.configure
@@ -1016,6 +1016,14 @@ def zlib_in_mozglue(system_zlib, js_shared, linker, os):
 set_config("ZLIB_IN_MOZGLUE", zlib_in_mozglue)
 set_define("ZLIB_IN_MOZGLUE", zlib_in_mozglue)
 
+option(
+    "--enable-base-browser",
+    help="Enable Base Browser"
+)
+
+set_config("BASE_BROWSER", True, when="--enable-base-browser")
+set_define("BASE_BROWSER", True, when="--enable-base-browser")
+
 
 # Please do not add configure checks from here on.
 
diff --git a/mozconfig-android-aarch64 b/mozconfig-android-aarch64
new file mode 100644
index 000000000000..5e166ec9ea8c
--- /dev/null
+++ b/mozconfig-android-aarch64
@@ -0,0 +1,4 @@
+. $topsrcdir/browser/config/mozconfigs/base-browser-android
+
+mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-aarch64-linux-android
+ac_add_options --target=aarch64-linux-android
diff --git a/mozconfig-android-all b/mozconfig-android-all
new file mode 100644
index 000000000000..24ce81ac88da
--- /dev/null
+++ b/mozconfig-android-all
@@ -0,0 +1,23 @@
+export MOZILLA_OFFICIAL=1
+
+ac_add_options --enable-application=mobile/android
+ac_add_options --disable-compile-environment
+
+# https://bugzilla.mozilla.org/show_bug.cgi?id=1758568
+ac_add_options --enable-minify=properties
+
+if test -n "$LOCAL_DEV_BUILD"; then
+    # You must use the "default" bogus channel for dev builds
+    ac_add_options --enable-update-channel=default
+    ac_add_options --without-wasm-sandboxed-libraries
+else
+    # We want to have a similar fat .aar versioning as Mozilla and make it clear
+    # we are on the beta channel for GeckoView
+    ac_add_options --enable-update-channel=beta
+fi
+
+ac_add_options --with-tor-browser-version=dev-build
+
+ac_add_options --with-java-bin-path=$JAVA_HOME/bin
+ac_add_options --with-android-sdk=$ANDROID_HOME
+ac_add_options --with-gradle=$GRADLE_HOME/bin/gradle
diff --git a/mozconfig-android-armv7 b/mozconfig-android-armv7
new file mode 100644
index 000000000000..05468e50be53
--- /dev/null
+++ b/mozconfig-android-armv7
@@ -0,0 +1,4 @@
+. $topsrcdir/browser/config/mozconfigs/base-browser-android
+
+mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-arm-linux-androideabi
+ac_add_options --target=arm-linux-androideabi
diff --git a/mozconfig-android-x86 b/mozconfig-android-x86
new file mode 100644
index 000000000000..ed1c88cf396e
--- /dev/null
+++ b/mozconfig-android-x86
@@ -0,0 +1,4 @@
+. $topsrcdir/browser/config/mozconfigs/base-browser-android
+
+mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-i386-linux-android
+ac_add_options --target=i686-linux-android
diff --git a/mozconfig-android-x86_64 b/mozconfig-android-x86_64
new file mode 100644
index 000000000000..f8f6a301d4fb
--- /dev/null
+++ b/mozconfig-android-x86_64
@@ -0,0 +1,4 @@
+. $topsrcdir/browser/config/mozconfigs/base-browser-android
+
+mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-x86_64-linux-android
+ac_add_options --target=x86_64-linux-android
diff --git a/mozconfig-linux-arm b/mozconfig-linux-arm
new file mode 100644
index 000000000000..0a476ed03bb4
--- /dev/null
+++ b/mozconfig-linux-arm
@@ -0,0 +1,18 @@
+. $topsrcdir/browser/config/mozconfigs/base-browser
+
+ac_add_options --target=arm-linux-gnueabihf
+
+ac_add_options --enable-default-toolkit=cairo-gtk3
+
+# Bug 31448: ld.gold fails if we don't disable debug-symbols.
+# Also, we keep strip enabled.
+ac_add_options --disable-debug-symbols
+
+# From Arch Linux ARM for Firefox 102.0.1
+# https://github.com/archlinuxarm/PKGBUILDs/blob/6da804f4020487c112f59ea067e6644a309c4338/extra/firefox/PKGBUILD
+ac_add_options --disable-elf-hack
+ac_add_options --disable-av1
+ac_add_options --enable-optimize="-g0 -O2"
+# One of the following two lines (not sure which) prevents "read-only segment has dynamic relocations" linker error.
+export MOZ_DEBUG_FLAGS=" "
+export RUSTFLAGS="-Cdebuginfo=0"
diff --git a/mozconfig-linux-i686 b/mozconfig-linux-i686
new file mode 100644
index 000000000000..16a75279e665
--- /dev/null
+++ b/mozconfig-linux-i686
@@ -0,0 +1,9 @@
+. $topsrcdir/browser/config/mozconfigs/base-browser
+
+ac_add_options --target=i686-linux-gnu
+
+ac_add_options --enable-default-toolkit=cairo-gtk3
+
+# Bug 31448: ld.gold fails if we don't disable debug-symbols.
+# Also, we keep strip enabled.
+ac_add_options --disable-debug-symbols
diff --git a/mozconfig-linux-x86_64 b/mozconfig-linux-x86_64
new file mode 100644
index 000000000000..f14f1f4df86b
--- /dev/null
+++ b/mozconfig-linux-x86_64
@@ -0,0 +1,9 @@
+. $topsrcdir/browser/config/mozconfigs/base-browser
+
+ac_add_options --enable-default-toolkit=cairo-gtk3
+
+ac_add_options --disable-strip
+ac_add_options --disable-install-strip
+
+# We want to bundle an own geckodriver, so we can use it for QA and other work
+ac_add_options --enable-geckodriver
diff --git a/mozconfig-linux-x86_64-asan b/mozconfig-linux-x86_64-asan
new file mode 100644
index 000000000000..62ca3feaad99
--- /dev/null
+++ b/mozconfig-linux-x86_64-asan
@@ -0,0 +1,22 @@
+. $topsrcdir/browser/config/mozconfigs/base-browser
+
+export CFLAGS="-fsanitize=address -Dxmalloc=myxmalloc"
+export CXXFLAGS="-fsanitize=address -Dxmalloc=myxmalloc"
+# We need to add -ldl explicitely due to bug 1213698
+export LDFLAGS="-fsanitize=address -ldl"
+
+# Define HOST_CFLAGS, etc. to avoid compiling programs such as mbsdiff
+# (which is part of mar-tools and is not distributed to end-users) with
+# ASan. See bug 17858.
+export HOST_CFLAGS=""
+export HOST_CXXFLAGS=""
+export HOST_LDFLAGS="-ldl"
+
+ac_add_options --enable-address-sanitizer
+ac_add_options --disable-jemalloc
+ac_add_options --disable-elf-hack
+
+ac_add_options --enable-default-toolkit=cairo-gtk3
+
+ac_add_options --disable-strip
+ac_add_options --disable-install-strip
diff --git a/mozconfig-linux-x86_64-dev b/mozconfig-linux-x86_64-dev
new file mode 100644
index 000000000000..71310891c4a0
--- /dev/null
+++ b/mozconfig-linux-x86_64-dev
@@ -0,0 +1,13 @@
+. $topsrcdir/browser/config/mozconfigs/base-browser
+
+# This mozconfig file is not used in official builds.
+# It is only intended to be used when doing incremental Linux builds
+# during development.
+
+export MOZILLA_OFFICIAL=
+
+ac_add_options --enable-default-toolkit=cairo-gtk3
+
+ac_add_options --disable-strip
+ac_add_options --disable-install-strip
+
diff --git a/mozconfig-macos-x86_64 b/mozconfig-macos-x86_64
new file mode 100644
index 000000000000..64f67c01ea15
--- /dev/null
+++ b/mozconfig-macos-x86_64
@@ -0,0 +1,6 @@
+. $topsrcdir/browser/config/mozconfigs/base-browser
+
+ac_add_options --enable-strip
+
+# See bug #41131
+ac_add_options --disable-update-agent
diff --git a/mozconfig-windows-i686 b/mozconfig-windows-i686
new file mode 100644
index 000000000000..0bf54b252d6c
--- /dev/null
+++ b/mozconfig-windows-i686
@@ -0,0 +1,14 @@
+. $topsrcdir/browser/config/mozconfigs/base-browser
+
+ac_add_options --target=i686-w64-mingw32
+ac_add_options --with-toolchain-prefix=i686-w64-mingw32-
+
+ac_add_options --enable-strip
+
+# Bits is Background Intelligent Transfer Service
+ac_add_options --disable-bits-download
+ac_add_options --disable-maintenance-service
+ac_add_options --disable-default-browser-agent
+
+# See bug #41131
+ac_add_options --disable-update-agent
diff --git a/mozconfig-windows-x86_64 b/mozconfig-windows-x86_64
new file mode 100644
index 000000000000..0e74d4d09099
--- /dev/null
+++ b/mozconfig-windows-x86_64
@@ -0,0 +1,14 @@
+. $topsrcdir/browser/config/mozconfigs/base-browser
+
+ac_add_options --target=x86_64-w64-mingw32
+ac_add_options --with-toolchain-prefix=x86_64-w64-mingw32-
+
+ac_add_options --enable-strip
+
+# Bits is Background Intelligent Transfer Service
+ac_add_options --disable-bits-download
+ac_add_options --disable-maintenance-service
+ac_add_options --disable-default-browser-agent
+
+# See bug #41131
+ac_add_options --disable-update-agent

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the tbb-commits mailing list