0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-05-18 10:53:48 +02:00

configure: Add conditional for --enable-lowmem-compile.

This commit is contained in:
Jason Volk 2019-03-22 17:46:21 -07:00
parent 2f1cd45fba
commit 3480819ab5
2 changed files with 20 additions and 6 deletions

View file

@ -418,6 +418,18 @@ fi
AM_CONDITIONAL([ASYNCEXCEPT], [[[[ $asyncexcept = "yes" ]]]])
dnl
dnl Low memory compilation mode
dnl
AC_ARG_ENABLE(lowmem-compile, AC_HELP_STRING([--enable-lowmem-compile], [Enable low-memory compilation options]),
[
lowmem_compile="yes"
], [
lowmem_compile="no"
])
AM_CONDITIONAL([LOWMEM_COMPILE], [[[[ $lowmem_compile = "yes" ]]]])
dnl
dnl Optimization

View file

@ -160,10 +160,12 @@ endif
# (>= 2 GiB) which can thrash small systems and even sometimes crash GCC.
# This option reduces memory consumption at the cost of compilation speed.
if GCC
json.lo: CXXFLAGS += --param ggc-min-expand=3
#http.lo: CXXFLAGS += --param ggc-min-expand=15
#rfc3986.lo: CXXFLAGS += --param ggc-min-expand=15
#rfc1459.lo: CXXFLAGS += --param ggc-min-expand=15
#m_id.lo: CXXFLAGS += --param ggc-min-expand=15
#fmt.lo: CXXFLAGS += --param ggc-min-expand=15
if LOWMEM_COMPILE
json.lo: CXXFLAGS += --param ggc-min-expand=1
http.lo: CXXFLAGS += --param ggc-min-expand=1
fmt.lo: CXXFLAGS += --param ggc-min-expand=1
rfc3986.lo: CXXFLAGS += --param ggc-min-expand=1
rfc1459.lo: CXXFLAGS += --param ggc-min-expand=1
m_id.lo: CXXFLAGS += --param ggc-min-expand=1
endif
endif