Skip to content

Commit 161b50a

Browse files
committed
mk: Don't build jemalloc with -g3
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
1 parent ba5f530 commit 161b50a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mk/rt.mk

+1-1
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ $$(JEMALLOC_LIB_$(1)): $$(JEMALLOC_DEPS) $$(MKFILE_DEPS)
261261
AR="$$(AR_$(1))" \
262262
RANLIB="$$(AR_$(1)) s" \
263263
CPPFLAGS="-I $(S)src/rt/" \
264-
EXTRA_CFLAGS="$$(CFG_CFLAGS_$(1))"
264+
EXTRA_CFLAGS="$$(CFG_CFLAGS_$(1)) -g1"
265265
$$(Q)$$(MAKE) -C "$$(JEMALLOC_BUILD_DIR_$(1))" build_lib_static
266266
$$(Q)cp $$(JEMALLOC_BUILD_DIR_$(1))/lib/$$(JEMALLOC_REAL_NAME_$(1)) $$(JEMALLOC_LIB_$(1))
267267

0 commit comments

Comments
 (0)