Commit 5f0d21d9 authored by Tim W's avatar Tim W
Browse files

firefox: extend compile flag "--enable-lto=cross" with parameter "full"

This fixes a regression in the discord web app. The issue was reported in:

    https://github.com/NixOS/nixpkgs/issues/332540

The regression was introduced in commit 23d4f834 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.
parent 2b4f91db
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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")