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-05-12 14:40:21 +0200
committerMartin Weinelt <hexa@darmstadt.ccc.de>2022-05-13 17:31:39 +0200
commita373324120a271fdbff202b61895e06aecf98923 (patch)
tree8000a633606f6869ae16eb31b6a3d111e1474994 /pkgs/applications/networking/browsers/firefox/common.nix
parent354b731b63ba1ca5fbd5faf1291c314d3d31d9cd (diff)
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.
Diffstat (limited to 'pkgs/applications/networking/browsers/firefox/common.nix')
-rw-r--r--pkgs/applications/networking/browsers/firefox/common.nix13
1 files changed, 13 insertions, 0 deletions
diff --git a/pkgs/applications/networking/browsers/firefox/common.nix b/pkgs/applications/networking/browsers/firefox/common.nix
index 9321e4910997a..5fda096ee1d34 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
   '';