about summary refs log tree commit diff
path: root/pkgs/applications/networking/browsers/firefox/common.nix
diff options
context:
space:
mode:
authorMartin Weinelt <hexa@darmstadt.ccc.de>2022-03-27 17:12:20 +0200
committerYuka <yuka@yuka.dev>2022-03-28 21:42:49 +0200
commit2cb9593cad3a351d064621def6875eee78feaecb (patch)
treeef8bc384ac1b7cb6e21275ba09f09142ff9b7bd4 /pkgs/applications/networking/browsers/firefox/common.nix
parent4cf4a7b848b45149c07dd69631ac7d65a49947b4 (diff)
firefox: always build with clang
Both LTO and PGO require the use of clang so I think its easier to just
stick with clang for all builds, so PGO and LTO could in theory be used
without each other.
Diffstat (limited to 'pkgs/applications/networking/browsers/firefox/common.nix')
-rw-r--r--pkgs/applications/networking/browsers/firefox/common.nix11
1 files changed, 4 insertions, 7 deletions
diff --git a/pkgs/applications/networking/browsers/firefox/common.nix b/pkgs/applications/networking/browsers/firefox/common.nix
index 63b2195d96b37..d5ade4ffd42ad 100644
--- a/pkgs/applications/networking/browsers/firefox/common.nix
+++ b/pkgs/applications/networking/browsers/firefox/common.nix
@@ -141,12 +141,10 @@ let
     bootBintools = null;
   };
 
-  buildStdenv = if ltoSupport
-    # LTO requires LLVM bintools including ld.lld and llvm-ar.
-    then overrideCC llvmPackages.stdenv (llvmPackages.stdenv.cc.override {
-      inherit (llvmPackages) bintools;
-    })
-    else stdenv;
+  # LTO requires LLVM bintools including ld.lld and llvm-ar.
+  buildStdenv = overrideCC llvmPackages.stdenv (llvmPackages.stdenv.cc.override {
+    inherit (llvmPackages) bintools;
+  });
 
   # Compile the wasm32 sysroot to build the RLBox Sandbox
   # https://hacks.mozilla.org/2021/12/webassembly-and-back-again-fine-grained-sandboxing-in-firefox-95/
@@ -289,7 +287,6 @@ buildStdenv.mkDerivation ({
     "--with-system-webp"
     "--with-system-zlib"
   ]
-  ++ lib.optional (!ltoSupport) "--with-clang-path=${llvmPackages.clang}/bin/clang"
   # LTO is done using clang and lld on Linux.
   ++ lib.optionals ltoSupport [
      "--enable-lto=cross" # Cross-Language LTO