-
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2653843
commit c39544b
Showing
2 changed files
with
210 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
## Copyright (c) 2023 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-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 --enable-lto | ||
ac_add_options --enable-wasm-avx | ||
ac_add_options --enable-optimize="-O3 -march=x86-64-v3" | ||
ac_add_options --enable-rust-simd | ||
ac_add_options --enable-hardening | ||
# ac_add_options --disable-trace-logging | ||
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 --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=0 | ||
MOZ_CRASHREPORTER=0 | ||
MOZ_DATA_REPORTING=0 | ||
MOZ_REQUIRE_SIGNING= | ||
export MOZ_CRASHREPORTER=0 | ||
export MOZ_DATA_REPORTING=0 | ||
export MOZ_REQUIRE_SIGNING= | ||
|
||
# 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" | ||
export 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 | ||
|
||
## Compiler, Linker, and Rust flags | ||
export CFLAGS="-O3 -march=x86-64-v3" | ||
export CPPFLAGS="-O3 -march=x86-64-v3" | ||
export CXXFLAGS="-O3 -march=x86-64-v3" | ||
export LDFLAGS="-Wl,-O3 -march=x86-64-v3" | ||
# export MOZ_LTO_LDFLAGS="-Wl,-mllvm,-polly" | ||
export RUSTFLAGS="-C target-feature=+avx2" | ||
export VERBOSE=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
## Copyright (c) 2023 Alex313031. | ||
|
||
## .mozconfig for compiling Mercury Browser for Windows natively | ||
|
||
# Build only Mercury | ||
ac_add_options --enable-application=browser | ||
ac_add_options --disable-artifact-builds | ||
|
||
# Build for Windows | ||
ac_add_options --enable-bootstrap | ||
ac_add_options --disable-update-agent | ||
# ac_add_options --disable-dmd | ||
# ac_add_options --disable-signmar | ||
# ac_add_options --disable-verify-mar | ||
|
||
CROSS_COMPILE=0 | ||
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 --enable-lto | ||
ac_add_options --enable-wasm-avx | ||
ac_add_options --enable-optimize="-O2 -O3 -march=x86-64-v3 -Xclang -O3" | ||
ac_add_options --enable-rust-simd | ||
ac_add_options --enable-hardening | ||
# ac_add_options --disable-trace-logging | ||
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-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 --disable-maintenance-service | ||
ac_add_options --without-wasm-sandboxed-libraries | ||
ac_add_options --disable-bits-download | ||
# 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=0 | ||
MOZ_CRASHREPORTER=0 | ||
MOZ_DATA_REPORTING=0 | ||
MOZ_REQUIRE_SIGNING= | ||
export MOZ_CRASHREPORTER=0 | ||
export MOZ_DATA_REPORTING=0 | ||
export MOZ_REQUIRE_SIGNING= | ||
|
||
# Installer | ||
export WIN32_REDIST_DIR="/c/Program Files/Microsoft Visual Studio/2022/Community/VC/Redist/MSVC/14.36.32532/x64/Microsoft.VC143.CRT" | ||
|
||
# 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="C:\mozilla-source\mozilla-unified\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" | ||
export 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 | ||
|
||
## Compiler, Linker, and Rust flags | ||
export CFLAGS="-O3 -march=x86-64-v3 /clang:-O3 /arch:AVX2" | ||
export CPPFLAGS="-O3 -march=x86-64-v3 /clang:-O3 /arch:AVX2" | ||
export CXXFLAGS="-O3 -march=x86-64-v3 /clang:-O3 /arch:AVX2" | ||
export LDFLAGS="-Wl,-O3 -march=x86-64-v3" | ||
# export MOZ_LTO_LDFLAGS="-mllvm:-polly" | ||
export RUSTFLAGS="-C target-feature=+avx2" | ||
export VERBOSE=1 |