mozilla-reduce-rust-debuginfo.patch
author Wolfgang Rosenauer <wr@rosenauer.org>
Fri, 13 Aug 2021 23:47:08 +0200
branchfirefox91
changeset 1160 b28cf22ff7cf
parent 1159 c4aba2fa0908
child 1171 130d464159be
permissions -rw-r--r--
Firefox 91.0

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 = []