-
-
Notifications
You must be signed in to change notification settings - Fork 24
/
mozconfig
114 lines (99 loc) · 3.46 KB
/
mozconfig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
## Copyright (c) 2024 Alex313031.
## .mozconfig for Mercury Browser (Linux)
# Build only Mercury
ac_add_options --enable-application=browser
ac_add_options --disable-artifact-builds
# Build for Linux
ac_add_options --target=x86_64-pc-linux-gnu
ac_add_options --enable-default-toolkit=cairo-gtk3-x11-wayland
ac_add_options --enable-bootstrap
export MOZ_INCLUDE_SOURCE_INFO=1
# Optimization settings
ac_add_options --enable-release
ac_add_options --disable-debug
ac_add_options --disable-debug-symbols
ac_add_options --disable-debug-js-modules
ac_add_options --disable-tests
ac_add_options --enable-strip
ac_add_options --enable-install-strip
ac_add_options --enable-clang-plugin
ac_add_options --disable-elf-hack
ac_add_options --enable-lto
ac_add_options --enable-wasm-avx
ac_add_options --enable-optimize="-O3 -msse3 -mssse3 -msse4.1 -msse4.2 -mavx -maes"
ac_add_options --enable-rust-simd
ac_add_options --enable-hardening
#ac_add_options --disable-trace-logging
mk_add_options MOZILLA_OFFICIAL=1
MOZILLA_OFFICIAL=1
export MOZILLA_OFFICIAL=1
mk_add_options MOZ_OPTIMIZE=1
MOZ_OPTIMIZE=1
export MOZ_OPTIMIZE=1
export STRIP_FLAGS="--strip-debug --strip-unneeded"
# Media settings
ac_add_options --enable-sandbox
ac_add_options --enable-raw
ac_add_options --enable-webrtc
ac_add_options --enable-pulseaudio
ac_add_options --enable-alsa
ac_add_options --enable-jxl
ac_add_options --enable-av1
ac_add_options --enable-eme=widevine
# Add-ons
ac_add_options --allow-addon-sideload
ac_add_options --with-unsigned-addon-scopes=app,system
# Client settings
ac_add_options --disable-parental-controls
ac_add_options --disable-crashreporter
ac_add_options --disable-updater
ac_add_options --enable-geckodriver
ac_add_options --without-wasm-sandboxed-libraries
#ac_add_options --disable-default-browser-agent
export MOZ_SOURCE_CHANGESET=${changeset}
mk_add_options MOZ_CRASHREPORTER=0
mk_add_options MOZ_DATA_REPORTING=0
mk_add_options MOZ_SERVICES_HEALTHREPORT=0
mk_add_options MOZ_TELEMETRY_REPORTING=
export MOZ_CRASHREPORTER=0
export MOZ_DATA_REPORTING=0
export MOZ_REQUIRE_SIGNING=
export MOZ_TELEMETRY_REPORTING=
# API Keys
ac_add_options --with-google-location-service-api-keyfile=@TOPSRCDIR@/ga
ac_add_options --with-google-safebrowsing-api-keyfile=@TOPSRCDIR@/ga
# Branding
ac_add_options --with-app-name=mercury
ac_add_options --with-app-basename=Mercury
ac_add_options --with-branding=browser/branding/mercury
ac_add_options --with-l10n-base=$PWD/browser/locales/en-US
ac_add_options --with-distribution-id=com.alex313031.mercury
#-app=/home/alex/bin/Mercury/application.ini
# Make flags (set to number of CPU cores)
mk_add_options MOZ_MAKE_FLAGS="-j16"
# Autoclobber
mk_add_options AUTOCLOBBER=1
export AUTOCLOBBER=1
# Set -Copt-level=3
export OPT_LEVEL="3"
ac_add_options OPT_LEVEL="3"
export RUSTC_OPT_LEVEL="3"
ac_add_options RUSTC_OPT_LEVEL="3"
# Enable PGO/LTO
export MOZ_LTO=1
ac_add_options MOZ_LTO=1
export MOZ_PGO=1
ac_add_options MOZ_PGO=1
if test "$GEN_PGO"; then
ac_add_options --enable-profile-generate
elif test "$USE_PGO"; then
ac_add_options --enable-profile-use=cross
fi
# Compiler, Linker, and Rust flags
export CFLAGS="-O3 -msse3 -mssse3 -msse4.1 -msse4.2 -mavx -maes"
export CPPFLAGS="-O3 -msse3 -mssse3 -msse4.1 -msse4.2 -mavx -maes"
export CXXFLAGS="-O3 -msse3 -mssse3 -msse4.1 -msse4.2 -mavx -maes"
export LDFLAGS="-Wl,-O3 -msse3 -mssse3 -msse4.1 -msse4.2 -mavx -maes"
#export MOZ_LTO_LDFLAGS="-Wl,-mllvm,-polly"
export RUSTFLAGS="-C target-feature=+avx -C codegen-units=1"
export VERBOSE=1