From a373324120a271fdbff202b61895e06aecf98923 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Thu, 12 May 2022 14:40:21 +0200 Subject: [PATCH] buildMozillaMach: create symbols output Thie zip bundle in this output is used in the dumps sent by the crashreporter. For this to happen we need to upload this zip file to https://symbols.mozilla.org, which is a separate effort. --- .../networking/browsers/firefox/common.nix | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/pkgs/applications/networking/browsers/firefox/common.nix b/pkgs/applications/networking/browsers/firefox/common.nix index 9321e491099..5fda096ee1d 100644 --- a/pkgs/applications/networking/browsers/firefox/common.nix +++ b/pkgs/applications/networking/browsers/firefox/common.nix @@ -23,6 +23,7 @@ # build time , autoconf , cargo +, dump_syms , makeWrapper , nodejs , perl @@ -168,6 +169,11 @@ buildStdenv.mkDerivation ({ inherit src unpackPhase meta; + outputs = [ + "out" + "symbols" + ]; + # Add another configure-build-profiling run before the final configure phase if we build with pgo preConfigurePhases = lib.optionals pgoSupport [ "configurePhase" @@ -196,6 +202,7 @@ buildStdenv.mkDerivation ({ nativeBuildInputs = [ autoconf cargo + dump_syms llvmPackages.llvm # llvm-objdump makeWrapper nodejs @@ -408,7 +415,13 @@ buildStdenv.mkDerivation ({ # tests were disabled in configureFlags doCheck = false; + # Generate build symbols once after the final build + # https://firefox-source-docs.mozilla.org/crash-reporting/uploading_symbol.html preInstall = '' + ./mach buildsymbols + mkdir -p $symbols/ + cp mozobj/dist/*.crashreporter-symbols.zip $symbols/ + cd mozobj '';