summaryrefslogtreecommitdiff
path: root/www/waterfox/files/patch-bug1409680
blob: 37c71ec234b2592ec22fc0380a6645e91ffc5a98 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
Bug 1409680 - Extend --disable-debug-symbols to Rust code.

This reduces disk I/O and memory usage during build that already lacks
debugging symbols from C++ code, allowing to use more jobs on 32bit hosts.

--disable-debug-symbols build on FreeBSD 10.3 i386 (8 cores) host:
Max RSS before:  libxul - 612 Mb, libgkrust - 1908 Mb
Max RSS after:   libxul - 444 Mb, libgkrust - 1471 Mb
Binary before:   libxul - 203 Mb, libgkrust -  732 Mb
Binary after:    libxul - 123 Mb, libgkrust -  301 Mb

--- config/rules.mk.orig	2017-09-14 20:15:53 UTC
+++ config/rules.mk
@@ -906,11 +906,13 @@ ifdef MOZ_USING_SCCACHE
 sccache_wrap := RUSTC_WRAPPER='$(CCACHE)'
 endif
 
+ifdef MOZ_DEBUG_SYMBOLS
 # XXX hack to work around dsymutil failing on cross-OSX builds (bug 1380381)
 ifeq ($(HOST_OS_ARCH)-$(OS_ARCH),Linux-Darwin)
 default_rustflags += -C debuginfo=1
 else
 default_rustflags += -C debuginfo=2
+endif
 endif
 
 # We use the + prefix to pass down the jobserver fds to cargo, but we