From 31ce093a4affc3fe8a5fb89fc6614558ecd4f1e2 Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Sun, 22 Dec 2024 14:36:02 +0100 Subject: [PATCH] Update LTO configuration and enable Clang plugin for Linux builds --- .github/workflows/linux-release-build.yml | 4 ++++ configs/common/mozconfig | 4 ++-- configs/linux/mozconfig | 3 +-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/linux-release-build.yml b/.github/workflows/linux-release-build.yml index 3485ddeca..fba343cf7 100644 --- a/.github/workflows/linux-release-build.yml +++ b/.github/workflows/linux-release-build.yml @@ -128,6 +128,10 @@ jobs: continue-on-error: true run: | export SURFER_PLATFORM="linux" + if test "${{ matrix.arch }}" = "x86_64-v3"; then + # TODO: Fix this! + export ZEN_DISABLE_LTO=1 + fi sh .github/workflows/src/release-build.sh - name: Build again if it failed diff --git a/configs/common/mozconfig b/configs/common/mozconfig index 5e7b77a81..73d23dc3c 100644 --- a/configs/common/mozconfig +++ b/configs/common/mozconfig @@ -54,8 +54,8 @@ if test "$ZEN_RELEASE"; then ac_add_options --disable-default-browser-agent if ! test "$ZEN_DISABLE_LTO"; then - export MOZ_LTO=cross,full - ac_add_options --enable-lto=cross,full + export MOZ_LTO=cross,thin + ac_add_options --enable-lto=cross,thin fi ac_add_options --enable-jemalloc diff --git a/configs/linux/mozconfig b/configs/linux/mozconfig index 965e9f465..63a677cbd 100644 --- a/configs/linux/mozconfig +++ b/configs/linux/mozconfig @@ -8,7 +8,6 @@ else fi if test "$SURFER_COMPAT" = "x86_64"; then - ac_add_options --enable-clang-plugin ac_add_options --target=x86_64-pc-linux ac_add_options --enable-eme=widevine @@ -25,7 +24,6 @@ if test "$SURFER_COMPAT" = "x86_64"; then export LDFLAGS="$LDFLAGS -Wl,-O3 -Wl,-mllvm,-fp-contract=fast -march=x86-64" export RUSTFLAGS="$RUSTFLAGS -C target-cpu=x86-64 -C codegen-units=1 -Clink-args=--icf=safe" elif test "$SURFER_COMPAT" = "aarch64"; then - ac_add_options --enable-clang-plugin ac_add_options --target=aarch64-linux-gnu ac_add_options --enable-optimize="-O3" @@ -63,6 +61,7 @@ ac_add_options --enable-alsa ac_add_options --enable-pulseaudio if test "$ZEN_RELEASE"; then + ac_add_options --enable-clang-plugin # Disable DMD and ELF hacks, enable linker lld ac_add_options --disable-dmd