1 # HG changeset patch |
1 # HG changeset patch |
2 # User msirringhaus@suse.de |
2 # User msirringhaus@suse.de |
3 # Date 1560754926 -7200 |
3 # Date 1560754926 -7200 |
4 # Mon Jun 17 09:02:06 2019 +0200 |
4 # Mon Jun 17 09:02:06 2019 +0200 |
5 # Node ID 428161c3b9599083e1b8710eda1760f1f707ab11 |
5 # Node ID 428161c3b9599083e1b8710eda1760f1f707ab11 |
6 # Parent 2a004fe4d56123f6e73a9436d1a290bbfc5e0b6b |
6 # Parent d55730171edb1935dec80234eba336787ff0e4e8 |
7 #Description: reduce the rust debuginfo level on selected architectures where |
7 #Description: reduce the rust debuginfo level on selected architectures where |
8 # compiling with debuginfo=2 causes the OOM killer to interrupt the build on |
8 # compiling with debuginfo=2 causes the OOM killer to interrupt the build on |
9 # launchpad builders. Initially this was only on 32 bit architectures, but with |
9 # launchpad builders. Initially this was only on 32 bit architectures, but with |
10 # firefox 63 it started happening frequently on arm64 and ppc64el too. |
10 # firefox 63 it started happening frequently on arm64 and ppc64el too. |
11 |
11 |
12 diff --git a/build/moz.configure/toolchain.configure b/build/moz.configure/toolchain.configure |
12 diff --git a/build/moz.configure/rust.configure b/build/moz.configure/rust.configure |
13 --- a/build/moz.configure/toolchain.configure |
13 --- a/build/moz.configure/rust.configure |
14 +++ b/build/moz.configure/toolchain.configure |
14 +++ b/build/moz.configure/rust.configure |
15 @@ -2145,18 +2145,19 @@ def rustc_opt_level(opt_level_option, mo |
15 @@ -603,18 +603,19 @@ set_config("CARGO_PROFILE_DEV_OPT_LEVEL" |
16 |
16 |
17 |
17 |
18 @depends( |
18 @depends( |
19 rustc_opt_level, |
19 rustc_opt_level, |
20 debug_rust, |
20 debug_rust, |
31 # |
31 # |
32 # But we'd also like to support an additional axis of control for |
32 # But we'd also like to support an additional axis of control for |
33 # optimization level. Since Cargo only supports 2 profiles, we're in |
33 # optimization level. Since Cargo only supports 2 profiles, we're in |
34 # a bit of a bind. |
34 # a bit of a bind. |
35 # |
35 # |
36 @@ -2169,16 +2170,18 @@ def rust_compile_flags(opt_level, debug_ |
36 @@ -627,16 +628,18 @@ def rust_compile_flags(opt_level, debug_ |
37 |
37 |
38 # opt-level=0 implies -C debug-assertions, which may not be desired |
38 # opt-level=0 implies -C debug-assertions, which may not be desired |
39 # unless Rust debugging is enabled. |
39 # unless Rust debugging is enabled. |
40 if opt_level == "0" and not debug_rust: |
40 if opt_level == "0" and not debug_rust: |
41 debug_assertions = False |
41 debug_assertions = False |
45 + if host.bitness == 32 or host.cpu == 'aarch64' or host.cpu == 'ppc64': |
45 + if host.bitness == 32 or host.cpu == 'aarch64' or host.cpu == 'ppc64': |
46 + debug_info = '1' |
46 + debug_info = '1' |
47 |
47 |
48 opts = [] |
48 opts = [] |
49 |
49 |
50 if opt_level is not None: |
|
51 opts.append("opt-level=%s" % opt_level) |
|
52 if debug_assertions is not None: |
50 if debug_assertions is not None: |
53 opts.append("debug-assertions=%s" % ("yes" if debug_assertions else "no")) |
51 opts.append("debug-assertions=%s" % ("yes" if debug_assertions else "no")) |
54 if debug_info is not None: |
52 if debug_info is not None: |
|
53 opts.append("debuginfo=%s" % debug_info) |
|
54 if frame_pointers: |