Skip to content

Commit

Permalink
Trying something new with mozconfigs
Browse files Browse the repository at this point in the history
  • Loading branch information
K4sum1 committed Jul 29, 2024
1 parent 32f799f commit bfb4d3d
Show file tree
Hide file tree
Showing 6 changed files with 259 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@
ac_add_options --target=x86_64-pc-mingw32
ac_add_options --with-toolchain-prefix=x86_64-pc-mingw32

# x86 build
#ac_add_options --target=i686-pc-mingw32
#ac_add_options --with-toolchain-prefix=i686-pc-mingw32
#ac_add_options --disable-sandbox

# Please do not redistribute this build with official branding if you are not part of Eclipse Community.
ac_add_options --with-app-name=r3dfox
ac_add_options --with-app-basename=r3dfox
Expand Down
104 changes: 104 additions & 0 deletions mozconfigs/mozconfig-win-cross-x86
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
## mozconfig for compiling r3dfox Browser for Windows on Linux

# x86 build
ac_add_options --target=i686-pc-mingw32
ac_add_options --with-toolchain-prefix=i686-pc-mingw32
ac_add_options --disable-sandbox

# Please do not redistribute this build with official branding if you are not part of Eclipse Community.
ac_add_options --with-app-name=r3dfox
ac_add_options --with-app-basename=r3dfox
# For potential nightly experimentation enable the below and disable the above.
#ac_add_options --with-branding=browser/branding/nightly
#ac_add_options --with-app-name=plasmafox
#ac_add_options --with-app-basename=Plasmafox
ac_add_options --enable-official-branding

# Updater stuffs
ac_add_options --disable-update-agent
ac_add_options --disable-updater
# Enable if update server and signatures are figured out
#ac_add_options --enable-nss-mar

# 16 jobs for 16 cores
mk_add_options MOZ_MAKE_FLAGS="-j16"

# Build for Windows on Linux
CROSS_COMPILE=1
export WINEDEBUG=-all
export DISPLAY=:2

# Build only r3dfox
ac_add_options --enable-application=browser
ac_add_options --disable-artifact-builds
export MOZ_INCLUDE_SOURCE_INFO=1
export MOZ_SOURCE_CHANGESET=iloveneedingtobodgechangesetfornoreason

# Optimization settings
ac_add_options --disable-accessibility
ac_add_options --disable-debug
ac_add_options --disable-debug-js-modules
ac_add_options --disable-debug-symbols
ac_add_options --disable-tests
ac_add_options --enable-clang-plugin
ac_add_options --enable-hardening
ac_add_options --enable-install-strip
ac_add_options --enable-jemalloc
ac_add_options --enable-lto
ac_add_options --enable-optimize="-Qunused-arguments -O2 -msse2 -Xclang -O3"
ac_add_options --enable-release
ac_add_options --enable-rust-simd
ac_add_options --enable-strip
MOZ_OPTIMIZE=1
export MOZ_OPTIMIZE=1
mk_add_options MOZ_OPTIMIZE=1
export MOZILLA_OFFICIAL=1
export STRIP_FLAGS="--strip-debug --strip-unneeded"

# Media settings
ac_add_options --disable-eme
ac_add_options --enable-av1
ac_add_options --enable-jxl
ac_add_options --enable-raw
ac_add_options --enable-webrtc

# Add-ons
ac_add_options --allow-addon-sideload
ac_add_options --with-unsigned-addon-scopes=app,system

# Client settings
ac_add_options --disable-backgroundtasks
ac_add_options --disable-bits-download
ac_add_options --disable-crashreporter
ac_add_options --disable-default-browser-agent
ac_add_options --disable-maintenance-service
ac_add_options --disable-notification-server
ac_add_options --disable-parental-controls
ac_add_options --without-wasm-sandboxed-libraries
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=

# 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 LTO
export MOZ_LTO=1
ac_add_options MOZ_LTO=1

# Compiler, Linker, and Rust flags
export CFLAGS="-Qunused-arguments -O2 -msse2 /clang:-O3"
export CPPFLAGS="-Qunused-arguments -O2 -msse2 /clang:-O3"
export CXXFLAGS="-Qunused-arguments -O2 -msse2 /clang:-O3"
export LDFLAGS="-Wl,-O3 -msse2"
POLLY="-mllvm -polly -mllvm -polly-2nd-level-tiling -mllvm -polly-loopfusion-greedy -mllvm -polly-pattern-matching-based-opts -mllvm -polly-position=before-vectorizer -mllvm -polly-vectorizer=stripmine"
export RUSTFLAGS="-C target-cpu=athlon64 -C target-feature=+sse2 -C codegen-units=1 -Z tune-cpu=athlon64"
export VERBOSE=1
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
## mozconfig for compiling r3dfox Browser for Windows natively

##Uncomment PGO for release build

#Uncomment for x86 build
#ac_add_options --target=i686
#ac_add_options --disable-sandbox
# x64 build
ac_add_options --target=x86_64

# 16 jobs for 16 cores
mk_add_options MOZ_MAKE_FLAGS="-j16"
Expand Down
43 changes: 43 additions & 0 deletions mozconfigs/mozconfig-win-debug-x86
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
## mozconfig for compiling r3dfox Browser for Windows natively

# x86 build
ac_add_options --target=i686
ac_add_options --disable-sandbox

# 16 jobs for 16 cores
mk_add_options MOZ_MAKE_FLAGS="-j16"

# Build only r3dfox
ac_add_options --enable-application=browser
ac_add_options --disable-artifact-builds
export MOZ_INCLUDE_SOURCE_INFO=1
export MOZ_SOURCE_CHANGESET=iloveneedingtobodgechangesetfornoreason

# Media settings
ac_add_options --disable-eme
ac_add_options --enable-av1
ac_add_options --enable-jxl
ac_add_options --enable-raw
ac_add_options --enable-webrtc

# Add-ons
ac_add_options --allow-addon-sideload
ac_add_options --with-unsigned-addon-scopes=app,system

# Client settings
ac_add_options --disable-accessibility
ac_add_options --disable-backgroundtasks
ac_add_options --disable-bits-download
ac_add_options --disable-default-browser-agent
ac_add_options --disable-maintenance-service
ac_add_options --disable-notification-server
ac_add_options --disable-parental-controls
ac_add_options --disable-update-agent
ac_add_options --disable-updater
ac_add_options --enable-clang-plugin
ac_add_options --enable-debug
ac_add_options --without-wasm-sandboxed-libraries
export CROSS_COMPILE=0
export MOZ_INCLUDE_SOURCE_INFO=1
export MOZ_REQUIRE_SIGNING=
export MOZ_SOURCE_CHANGESET=iloveneedingtobodgechangesetfornoreason
5 changes: 2 additions & 3 deletions mozconfigs/mozconfig-win → mozconfigs/mozconfig-win-x64
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@

##Uncomment PGO for release build

#Uncomment for x86 build
#ac_add_options --target=i686
#ac_add_options --disable-sandbox
# x64 build
ac_add_options --target=x86_64

# Please do not redistribute this build with official branding if you are not part of Eclipse Community.
ac_add_options --with-app-name=r3dfox
Expand Down
108 changes: 108 additions & 0 deletions mozconfigs/mozconfig-win-x86
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
## mozconfig for compiling r3dfox Browser for Windows natively

##Uncomment PGO for release build

# x86 build
ac_add_options --target=i686
ac_add_options --disable-sandbox

# Please do not redistribute this build with official branding if you are not part of Eclipse Community.
ac_add_options --with-app-name=r3dfox
ac_add_options --with-app-basename=r3dfox
# For potential nightly experimentation enable the below and disable the above.
#ac_add_options --with-branding=browser/branding/nightly
#ac_add_options --with-app-name=plasmafox
#ac_add_options --with-app-basename=Plasmafox
ac_add_options --enable-official-branding

# Updater stuffs
ac_add_options --disable-update-agent
ac_add_options --disable-updater
# Enable if update server and signatures are figured out
#ac_add_options --enable-nss-mar

# 16 jobs for 16 cores
mk_add_options MOZ_MAKE_FLAGS="-j16"

# Build only r3dfox
ac_add_options --enable-application=browser
ac_add_options --disable-artifact-builds
export MOZ_INCLUDE_SOURCE_INFO=1
export MOZ_SOURCE_CHANGESET=iloveneedingtobodgechangesetfornoreason

# Optimization settings
ac_add_options --disable-accessibility
ac_add_options --disable-debug
ac_add_options --disable-debug-js-modules
ac_add_options --disable-debug-symbols
ac_add_options --disable-tests
ac_add_options --enable-clang-plugin
ac_add_options --enable-hardening
ac_add_options --enable-install-strip
ac_add_options --enable-jemalloc
ac_add_options --enable-lto
ac_add_options --enable-optimize="-Qunused-arguments -O2 -msse2 -Xclang -O3"
ac_add_options --enable-release
ac_add_options --enable-rust-simd
ac_add_options --enable-strip
MOZ_OPTIMIZE=1
export MOZ_OPTIMIZE=1
mk_add_options MOZ_OPTIMIZE=1
export MOZILLA_OFFICIAL=1
export STRIP_FLAGS="--strip-debug --strip-unneeded"

# Media settings
ac_add_options --disable-eme
ac_add_options --enable-av1
ac_add_options --enable-jxl
ac_add_options --enable-raw
ac_add_options --enable-webrtc

# Add-ons
ac_add_options --allow-addon-sideload
ac_add_options --with-unsigned-addon-scopes=app,system

# Client settings
ac_add_options --disable-backgroundtasks
ac_add_options --disable-bits-download
ac_add_options --disable-crashreporter
ac_add_options --disable-default-browser-agent
ac_add_options --disable-maintenance-service
ac_add_options --disable-notification-server
ac_add_options --disable-parental-controls
ac_add_options --without-wasm-sandboxed-libraries
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=

# 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 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="-Qunused-arguments -O2 -msse2 /clang:-O3"
export CPPFLAGS="-Qunused-arguments -O2 -msse2 /clang:-O3"
export CXXFLAGS="-Qunused-arguments -O2 -msse2 /clang:-O3"
export LDFLAGS="-Wl,-O3 -msse2"
POLLY="-mllvm -polly -mllvm -polly-2nd-level-tiling -mllvm -polly-loopfusion-greedy -mllvm -polly-pattern-matching-based-opts -mllvm -polly-position=before-vectorizer -mllvm -polly-vectorizer=stripmine"
export RUSTFLAGS="-C target-cpu=athlon64 -C target-feature=+sse2 -C codegen-units=1 -Z tune-cpu=athlon64"
export VERBOSE=1

0 comments on commit bfb4d3d

Please sign in to comment.