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),