From 65380797e1b2f041569edc6cd9b5fdf1b2c6eec1 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sat, 22 Apr 2023 02:53:50 +0200 Subject: [PATCH] Fix windows debug builds (really now) This partially reverts commit 4dc4d53004c72759c9ba896ec912f270cd9a79e9. --- tools/x-win/compile.sh | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/tools/x-win/compile.sh b/tools/x-win/compile.sh index c7ea76d8fd..a5c6509704 100755 --- a/tools/x-win/compile.sh +++ b/tools/x-win/compile.sh @@ -63,8 +63,18 @@ export WINRC=${XPREFIX}-windres export RANLIB=${XPREFIX}-ranlib export DLLTOOL=${XPREFIX}-dlltool -CFLAGS="-mstackrealign" \ -CXXFLAGS="-mstackrealign" \ +if grep -q optimize <<<"$ARDOURCFG"; then + OPT="" +else + # debug-build luabindings.cc, has > 60k symbols. + # -Wa,-mbig-obj has an unreasonable long build-time + # so libs/ardour/wscript only uses it for luabindings.cc. + # session.cc is also big, -Og to the rescue. + OPT=" -Og" +fi + +CFLAGS="-mstackrealign$OPT" \ +CXXFLAGS="-mstackrealign$OPT" \ LDFLAGS="-L${PREFIX}/lib" \ DEPSTACK_ROOT="$PREFIX" \ ./waf configure \