mirror of
https://github.com/matrix-construct/construct
synced 2024-09-27 11:18:51 +02:00
configure: Add conditional for --enable-lowmem-compile.
This commit is contained in:
parent
2f1cd45fba
commit
3480819ab5
2 changed files with 20 additions and 6 deletions
12
configure.ac
12
configure.ac
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue