git.iko.soy/typeable/nixpkgs
on master help sign in
firefox: let LTO on Darwin select its own linker
commit214c8335897bd42c0cd9289b42db2c3f685eb112 authorS. Nordin Abouzahra <abouzahra.9@wright.edu> dateThu 8 Oct 2020, 21:55 (6 years ago) parent4f12bdd
1 file changed+5−4
pkgs/applications/networking/browsers/firefox/common.nix+5−4
pkgs/applications/networking/browsers/firefox/common.nix+5−4
@@ -253,14 +253,15 @@ buildStdenv.mkDerivation ({
253253 ]
254254 ++ lib.optional (buildStdenv.isDarwin) "--disable-xcode-checks"
255255 ++ lib.optional (!ltoSupport) "--with-clang-path=${llvmPackages.clang}/bin/clang"
256− # LTO is done using clang and lld.
256+ # LTO is done using clang and lld on Linux.
257+ # Darwin needs to use the default linker as lld is not supported (yet?):
258+ # https://bugzilla.mozilla.org/show_bug.cgi?id=1538724
257259 # elf-hack is broken when using clang:
258− # https://bugzilla.mozilla.org/show_bug.cgi?id=1482204
260+ # https://bugzilla.mozilla.org/show_bug.cgi?id=1482204
259261 ++ lib.optionals ltoSupport [
260262 "--enable-lto"
261− "--enable-linker=lld"
262263 "--disable-elf-hack"
263− ]
264+ ] ++ lib.optional (ltoSupport && !buildStdenv.isDarwin) "--enable-linker=lld"
264265
265266 ++ flag alsaSupport "alsa"
266267 ++ flag pulseaudioSupport "pulseaudio"