From dc43c2a60c4f2a1e9e5f79d8ecf2f36c1fba56ba Mon Sep 17 00:00:00 2001 From: Carsten Schoenert Date: Wed, 30 Sep 2020 17:21:27 +0200 Subject: [PATCH] reduce the rust debuginfo level on selected architectures Compiling with debuginfo=2 causes the OOM killer to interrupt the build on launchpad builders. Initially this was only on 32 bit architectures, but with firefox 63 it started happening frequently on arm64 and ppc64el too, and with newer versions it started happening very frequently on s390x too. Patch cherry-picked from Ubuntu. Gbp-Pq: Topic fixes Gbp-Pq: Name reduce-the-rust-debuginfo-level-on-selected-architectures.patch --- build/moz.configure/toolchain.configure | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/build/moz.configure/toolchain.configure b/build/moz.configure/toolchain.configure index 91736eae12..71fc2722e5 100755 --- a/build/moz.configure/toolchain.configure +++ b/build/moz.configure/toolchain.configure @@ -1873,8 +1873,8 @@ def rustc_opt_level(opt_level_option, moz_optimize): return '1' if moz_optimize.optimize else '0' -@depends(rustc_opt_level, debug_rust, '--enable-debug-symbols', '--enable-frame-pointers') -def rust_compile_flags(opt_level, debug_rust, debug_symbols, frame_pointers): +@depends(rustc_opt_level, debug_rust, '--enable-debug-symbols', '--enable-frame-pointers', host) +def rust_compile_flags(opt_level, debug_rust, debug_symbols, frame_pointers, host): # Cargo currently supports only two interesting profiles for building: # development and release. Those map (roughly) to --enable-debug and # --disable-debug in Gecko, respectively. @@ -1897,6 +1897,8 @@ def rust_compile_flags(opt_level, debug_rust, debug_symbols, frame_pointers): if debug_symbols: debug_info = '2' + if host.bitness == 32 or host.cpu in ('aarch64', 'ppc64', 's390x', 'x86'): + debug_info = '1' opts = [] -- 2.30.2