blob: 4c6ef2ed841ec6c0af0a75a4032a2bcb9152f48f [file] [log] [blame]
Andrew Geissler4873add2020-11-02 18:44:49 -06001From 2afd025997a57794ce24e07e914b461dfea6ba5f Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Mon, 26 Aug 2019 16:04:16 +0200
4Subject: [PATCH] build.sh: use -DNDEBUG also in debug builds
5
6Without it, there is a significant performance regression
7when running 'bjam install'.
8
9Upstream-Status: Inappropriate [configuration]
10Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
11---
12 tools/build/src/engine/build.sh | 2 +-
13 1 file changed, 1 insertion(+), 1 deletion(-)
14
15diff --git a/tools/build/src/engine/build.sh b/tools/build/src/engine/build.sh
16index a1e4cd335..64e0a4c80 100755
17--- a/tools/build/src/engine/build.sh
18+++ b/tools/build/src/engine/build.sh
19@@ -436,7 +436,7 @@ case $B2_OS in
20 ;;
21 esac
22
23-if check_debug_build "$@" ; then B2_CXXFLAGS="${B2_CXXFLAGS_DEBUG}"
24+if check_debug_build "$@" ; then B2_CXXFLAGS="${B2_CXXFLAGS_DEBUG} -DNDEBUG"
25 else B2_CXXFLAGS="${B2_CXXFLAGS_RELEASE} -DNDEBUG"
26 fi
27 echo_run ${B2_CXX} ${CXXFLAGS} ${B2_CXXFLAGS} ${B2_SOURCES} -o b2