From b1ce11974edf272d4a644de44b5229c1c5ee515a Mon Sep 17 00:00:00 2001 From: Ben Siraphob Date: Thu, 16 Jul 2026 13:52:45 -0700 Subject: [PATCH] firefox: disable PGO on 32-bit --- pkgs/build-support/build-mozilla-mach/default.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pkgs/build-support/build-mozilla-mach/default.nix b/pkgs/build-support/build-mozilla-mach/default.nix index f8298a4c6fe8..f6e3d8b62661 100644 --- a/pkgs/build-support/build-mozilla-mach/default.nix +++ b/pkgs/build-support/build-mozilla-mach/default.nix @@ -145,7 +145,13 @@ in ), overrideCC, buildPackages, - pgoSupport ? (stdenv.hostPlatform.isLinux && stdenv.hostPlatform == stdenv.buildPlatform), + # PGO merges profile data with a 32-bit llvm-profdata, which runs out of + # address space on the huge libxul profile, so disable it on 32-bit. + pgoSupport ? ( + stdenv.hostPlatform.isLinux + && stdenv.hostPlatform == stdenv.buildPlatform + && stdenv.hostPlatform.is64bit + ), xvfb-run, elfhackSupport ? isElfhackPlatform stdenv && !(stdenv.hostPlatform.isMusl && stdenv.hostPlatform.isAarch64),