Skip to content

Commit

Permalink
firefox: extend compile flag "--enable-lto=cross" with parameter "full"
Browse files Browse the repository at this point in the history
This fixes a regression in the discord web app. The issue was reported in:

    NixOS#332540

The regression was introduced in commit 23d4f83 via an upgrade of rust
compiler from 1.77.2 to 1.78.0. The fix is based on a comparison between the
generated firefox build script generated by

    pkgs/applications/networking/browsers/firefox/common.nix

and the firefox build script of archlinux found at:

    https://gitlab.archlinux.org/archlinux/packaging/packages/firefox/-/blob/1376cddc7e29fe049fd4afc15fc3b7da5e5fc99b/PKGBUILD

Enabling "full" link time optimization fixed the regression in the discord web
app. Further compile flags where not ported from the archlinux build script.
  • Loading branch information
Tim-Wsm committed Dec 20, 2024
1 parent 2b4f91d commit 5f0d21d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkgs/applications/networking/browsers/firefox/common.nix
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ buildStdenv.mkDerivation {
]
# LTO is done using clang and lld on Linux.
++ lib.optionals ltoSupport [
"--enable-lto=cross" # Cross-Language LTO
"--enable-lto=cross,full" # Cross-Language LTO
"--enable-linker=lld"
]
++ lib.optional (isElfhackPlatform stdenv) (enableFeature elfhackSupport "elf-hack")
Expand Down

0 comments on commit 5f0d21d

Please sign in to comment.