diff --git a/pkgs/applications/networking/browsers/firefox/common.nix b/pkgs/applications/networking/browsers/firefox/common.nix index c99d1c10a12c..0326e2f0ecaf 100644 --- a/pkgs/applications/networking/browsers/firefox/common.nix +++ b/pkgs/applications/networking/browsers/firefox/common.nix @@ -110,7 +110,10 @@ let # When LTO for Darwin is fixed, the following will need updating as lld # doesn't work on it. For now it is fine since ltoSupport implies no Darwin. buildStdenv = if ltoSupport - then overrideCC stdenv llvmPackages.clangUseLLVM + # LTO requires LLVM bintools including ld.lld and llvm-ar. + then overrideCC llvmPackages.stdenv (llvmPackages.stdenv.cc.override { + inherit (llvmPackages) bintools; + }) else stdenv; # --enable-release adds -ffunction-sections & LTO that require a big amount of