about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-05-16 02:46:25 -0700
committerbors <bors@rust-lang.org>2014-05-16 02:46:25 -0700
commitbbd034c3a6e0325da0cb743cab007d69a736557a (patch)
tree816ac03e17de25d1870802651b0d098eebbd64ed
parentd92926ca3b984d7f58b685322083ff309f73c0bd (diff)
parent161b50a8e63ea4fd92d42750c6e0feaed269a92e (diff)
downloadrust-bbd034c3a6e0325da0cb743cab007d69a736557a.tar.gz
rust-bbd034c3a6e0325da0cb743cab007d69a736557a.zip
auto merge of #14237 : alexcrichton/rust/issue-14144, r=cmr
By default, jemalloc is building itself with -g3 if the local compiler supports
it. It looks like this is generating a good deal of debug info that windows
isn't optimizing out (on the order of 18MB). Windows gcc/ld is also not
optimizing this data away, causing hello world to be 18MB in size.

There's no current real need for debugging jemalloc to a great extent, so this
commit manually passes -g1 to override -g3 which jemalloc is using. This is
confirmed to drop the size of executables on windows back to a more reasonable
size (2.0MB, as they were before).

Closes #14144
-rw-r--r--mk/rt.mk2
1 files changed, 1 insertions, 1 deletions
diff --git a/mk/rt.mk b/mk/rt.mk
index 67ca5fefffc..c506e8f78cb 100644
--- a/mk/rt.mk
+++ b/mk/rt.mk
@@ -261,7 +261,7 @@ $$(JEMALLOC_LIB_$(1)): $$(JEMALLOC_DEPS) $$(MKFILE_DEPS)
 		AR="$$(AR_$(1))" \
 		RANLIB="$$(AR_$(1)) s" \
 		CPPFLAGS="-I $(S)src/rt/" \
-		EXTRA_CFLAGS="$$(CFG_CFLAGS_$(1))"
+		EXTRA_CFLAGS="$$(CFG_CFLAGS_$(1)) -g1"
 	$$(Q)$$(MAKE) -C "$$(JEMALLOC_BUILD_DIR_$(1))" build_lib_static
 	$$(Q)cp $$(JEMALLOC_BUILD_DIR_$(1))/lib/$$(JEMALLOC_REAL_NAME_$(1)) $$(JEMALLOC_LIB_$(1))