Verified Commit 9f15c9c7 authored by Pier Angelo Vendrame's avatar Pier Angelo Vendrame 🎃
Browse files

Base Browser's .mozconfigs.

Bug 17858: Cannot create incremental MARs for hardened builds.
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.

Bug 21849: Don't allow SSL key logging.

Bug 25741 - TBA: Disable features at compile-time

Define MOZ_ANDROID_NETWORK_STATE and MOZ_ANDROID_LOCATION

Bug 27623 - Export MOZILLA_OFFICIAL during desktop builds

This fixes a problem where some preferences had the wrong default value.
Also see bug 27472 where we made a similar fix for Android.

Bug 29859: Disable HLS support for now

Bug 30463: Explicitly disable MOZ_TELEMETRY_REPORTING

Bug 32493: Disable MOZ_SERVICES_HEALTHREPORT

Bug 33734: Set MOZ_NORMANDY to False

Bug 33851: Omit Parental Controls.

Bug 40252: Add --enable-rust-simd to our tor-browser mozconfig files

Bug 41584: Move some configuration options to base-browser level
parent 2fc8f059
Loading
Loading
Loading
Loading
+50 −0
Original line number Diff line number Diff line
# 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-@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 --disable-unverified-updates

ac_add_options --enable-bundled-fonts

# See bug #41587
ac_add_options --disable-updater

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

# Disable telemetry
ac_add_options MOZ_TELEMETRY_REPORTING=

# Disable the creation of a <something>.default that Firefox by default creates
# for old version that could not use dedicated profiles. See tor-browser#41542.
ac_add_options --disable-legacy-profile-creation

if test -z "$WASI_SYSROOT"; then
    ac_add_options --without-wasm-sandboxed-libraries
fi
+46 −0
Original line number Diff line number Diff line
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 --enable-linker=lld
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

# 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
    ac_add_options --with-base-browser-version=dev-build
fi

if test -z "$WASI_SYSROOT"; then
    ac_add_options --without-wasm-sandboxed-libraries
fi
+2 −21
Original line number Diff line number Diff line
@@ -5,26 +5,6 @@

MOZ_APP_VENDOR=Mozilla

if test "$OS_ARCH" = "WINNT"; then
  if ! test "$HAVE_64BIT_BUILD"; then
    if test "$MOZ_UPDATE_CHANNEL" = "nightly" -o \
            "$MOZ_UPDATE_CHANNEL" = "nightly-try" -o \
            "$MOZ_UPDATE_CHANNEL" = "aurora" -o \
            "$MOZ_UPDATE_CHANNEL" = "beta" -o \
            "$MOZ_UPDATE_CHANNEL" = "release"; then
      if ! test "$MOZ_DEBUG"; then
        if ! test "$USE_STUB_INSTALLER"; then
          # Expect USE_STUB_INSTALLER from taskcluster for downstream task consistency
          echo "ERROR: STUB installer expected to be enabled but"
          echo "ERROR: USE_STUB_INSTALLER is not specified in the environment"
          exit 1
        fi
        MOZ_STUB_INSTALLER=1
      fi
    fi
  fi
fi

BROWSER_CHROME_URL=chrome://browser/content/browser.xhtml

# MOZ_APP_DISPLAYNAME will be set by branding/configure.sh
@@ -37,7 +17,8 @@ MOZ_BRANDING_DIRECTORY=browser/branding/unofficial
MOZ_OFFICIAL_BRANDING_DIRECTORY=browser/branding/official
MOZ_APP_ID={ec8030f7-c20a-464f-9b0e-13a3a9e97384}

MOZ_PROFILE_MIGRATOR=1
# tor-browser#41577: Do not enable profile migration
# MOZ_PROFILE_MIGRATOR=1

# Include the DevTools client, not just the server (which is the default)
MOZ_DEVTOOLS=all
+4 −2
Original line number Diff line number Diff line
@@ -5,11 +5,13 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

imply_option("MOZ_PLACES", True)
imply_option("MOZ_SERVICES_HEALTHREPORT", True)
# tor-browser#32493
imply_option("MOZ_SERVICES_HEALTHREPORT", False)
imply_option("MOZ_SERVICES_SYNC", True)
imply_option("MOZ_DEDICATED_PROFILES", True)
imply_option("MOZ_BLOCK_PROFILE_DOWNGRADE", True)
imply_option("MOZ_NORMANDY", True)
# tor-browser#33734
imply_option("MOZ_NORMANDY", False)

with only_when(target_has_linux_kernel & compile_environment):
    option(env="MOZ_NO_PIE_COMPAT", help="Enable non-PIE wrapper")
+33 −0
Original line number Diff line number Diff line
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# 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/.

# Set Base Browser default config
# See tor-browser#25741 and tor-browser#41584.

imply_option("MOZ_ANDROID_EXCLUDE_FONTS", False)

# Disable uploading crash reports and dump files to an external server
# This is still configured in old-configure. Uncomment when this moves
# to the python config
# imply_option("MOZ_CRASHREPORTER", False)

# Disable uploading information about the browser configuration and
# performance to an external server. See tor-browser#32493.
imply_option("MOZ_SERVICES_HEALTHREPORT", False)

# Disable creating telemetry and data reports that are uploaded to an
# external server
# These aren't actually configure options. These are disabled in
# confvars.sh, but they look like configure options so we'll document
# them here, as well.
# XXX: no confvars.sh here
# imply_option("MOZ_TELEMETRY_REPORTING", False)
# imply_option("MOZ_DATA_REPORTING", False)

# tor-browser#24796: This controls some permissions in GeckoView's
# AndroidManifest.xml
imply_option("MOZ_ANDROID_NETWORK_STATE", False)
imply_option("MOZ_ANDROID_LOCATION", False)
Loading