Verified Commit 0a694f91 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 9093101d
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@

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
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

# tor-browser#42337
ac_add_options --enable-geckodriver
+49 −0
Original line number Diff line number Diff line
# Changes on this file might need to be synchronized with mozconfig-android-all!
# See also tor-browser#43151.

export MOZILLA_OFFICIAL=1

ac_add_options --enable-optimize
ac_add_options --enable-rust-simd

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

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

# See tor-browser#41131
ac_add_options --disable-backgroundtasks

# 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
    ac_add_options --disable-minify
fi

if test -z "$WASI_SYSROOT"; then
    ac_add_options --without-wasm-sandboxed-libraries
fi
+6 −4
Original line number Diff line number Diff line
@@ -5,12 +5,14 @@
# 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)
imply_option("MOZ_PROFILE_MIGRATOR", True)
# tor-browser#33734
imply_option("MOZ_NORMANDY", False)
imply_option("MOZ_PROFILE_MIGRATOR", False)


imply_option("MOZ_APP_VENDOR", "Mozilla")
@@ -64,7 +66,7 @@ def requires_stub_installer(
            "USE_STUB_INSTALLER is not specified in the environment"
        )

    return True
    return False


imply_option("MOZ_STUB_INSTALLER", True, when=requires_stub_installer)
+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)
+8 −2
Original line number Diff line number Diff line
@@ -10,10 +10,11 @@ project_flag(
    default=True,
)

# tor-browser#29859
project_flag(
    "MOZ_ANDROID_HLS_SUPPORT",
    help="Enable HLS (HTTP Live Streaming) support (currently using the ExoPlayer library)",
    default=True,
    default=False,
)

option(
@@ -112,7 +113,10 @@ set_config("MOZ_ANDROID_DEBUGGABLE", android_debuggable)


imply_option("MOZ_NORMANDY", False)
imply_option("MOZ_SERVICES_HEALTHREPORT", True)
# Comment this so we can imply |False| in basebrowser.configure
# The Build system doesn't allow multiple imply_option()
# calls with the same key.
# imply_option("MOZ_SERVICES_HEALTHREPORT", True)
imply_option("MOZ_GECKOVIEW_HISTORY", True)

imply_option("MOZ_APP_UA_NAME", "Firefox")
@@ -135,6 +139,8 @@ def check_target(target):
        )


include("basebrowser.configure")

include("../shared/moz.configure")
include("../../toolkit/moz.configure")
include("../../build/moz.configure/android-sdk.configure")
Loading