mozilla-reduce-rust-debuginfo.patch
author Wolfgang Rosenauer <wr@rosenauer.org>
Tue, 02 Nov 2021 13:21:17 +0100
branchfirefox91
changeset 1167 7852ceef239b
parent 1160 b28cf22ff7cf
permissions -rw-r--r--
Firefox 91.2.0esr

diff --git a/build/moz.configure/rust.configure b/build/moz.configure/rust.configure
--- a/build/moz.configure/rust.configure
+++ b/build/moz.configure/rust.configure
@@ -610,6 +610,7 @@ set_config("CARGO_PROFILE_DEV_OPT_LEVEL"
     "--enable-frame-pointers",
     path_remapping,
     path_remappings,
+    host
 )
 def rust_compile_flags(
     opt_level,
@@ -619,6 +620,7 @@ def rust_compile_flags(
     frame_pointers,
     path_remapping,
     path_remappings,
+    host
 ):
     # Cargo currently supports only two interesting profiles for building:
     # development and release. Those map (roughly) to --enable-debug and
@@ -642,6 +644,8 @@ def rust_compile_flags(
 
     if debug_symbols:
         debug_info = "2"
+        if host.bitness == 32 or host.cpu == 'aarch64' or host.cpu == 'ppc64' or host.cpu == 's390x':
+            debug_info = '1'
 
     opts = []