summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2019-04-30 18:38:31 +0200
committerHarald Welte <laforge@gnumonks.org>2019-04-30 19:07:47 +0200
commit01e72d56e868fc9aef97e95062446df5b030ce60 (patch)
tree400f0b46626856d41c877a3eeb868a70aad16d27
parente63229e920e16cd6c05421b836dd49f489ede2a0 (diff)
regen-makefile: Use '-U 5' to split C++ files in multiple chunks
Particularly the C++ files generated for the rather comprehensive 3GPP asn.1 specified protocols like MAP, RANAP, ... result in very large source files and subsequently g++ processes that consume well into the multiple gigabyte range of memory. Let's use the '-U 5' option to ask the ttcn3_compiler to split all c++ files into 5 chunks, resulting in more files to compile, but smaller individual files. I also tested '-U type' before, but it was still grinding my 16GB RAM laptop to unusable deep-swapping state when running 'make -j8' for the IuCS extended MSC test suite. Change-Id: I013b623e98d58a39dd7bb2b0db4a911725028535
-rwxr-xr-xregen-makefile.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/regen-makefile.sh b/regen-makefile.sh
index 77fcb6c4..d2b747e5 100755
--- a/regen-makefile.sh
+++ b/regen-makefile.sh
@@ -24,7 +24,7 @@ if [ -z "$USE_CCACHE" ] && which ccache 2>/dev/null; then
USE_CCACHE=1
fi
-ttcn3_makefilegen -p -l -f $*
+ttcn3_makefilegen -p -l -U 5 -f $*
TITAN_VERSION=$(ttcn3_makefilegen -v 2>&1 |grep "Product number" |cut --delimiter="/" -f 2-| sed -e "s/[A-Z ]//g")
@@ -60,5 +60,5 @@ if [ "x$USE_CCACHE" = "x1" ]; then
sed -i -e 's/^CXX = g++ $/CXX = env CCACHE_SLOPPINESS=time_macros ccache g++/' Makefile
# Append the -D option to compiler flags. This option disables timestamps
# inside comments in the generated C++ code which interfere with ccache.
- sed -i -e 's/^COMPILER_FLAGS = \(.*\)/&-D/' Makefile
+ sed -i -e 's/^COMPILER_FLAGS = \(.*\)/& -D/' Makefile
fi