Fix windows debug builds (obj file too large)
This fixes a "too many sections" issue ``` Fatal error: can't write 159 bytes to section .text of build/libs/ardour/luabindings.cc.1.o: 'file too big' x86_64-w64-mingw32-as: build/libs/ardour/luabindings.cc.1.o: too many sections (36781) ```
This commit is contained in:
parent
8629aea237
commit
4dc4d53004
@ -129,7 +129,6 @@ libardour_sources = [
|
||||
'ltc_file_reader.cc',
|
||||
'ltc_slave.cc',
|
||||
'lua_api.cc',
|
||||
'luabindings.cc',
|
||||
'luaproc.cc',
|
||||
'luascripting.cc',
|
||||
'meter.cc',
|
||||
@ -461,6 +460,25 @@ def build(bld):
|
||||
if bld.is_defined('AUDIOUNIT_SUPPORT'):
|
||||
obj.source += [ 'audio_unit.cc', 'auv2_scan.cc' ]
|
||||
|
||||
lua_cxxflags = bld.env['compiler_flags_dict']['pic']
|
||||
if bld.env['build_target'] == 'mingw' and bld.env['DEBUG']:
|
||||
lua_cxxflags += " -Og -Wa,-mbig-obj"
|
||||
|
||||
bld(features = 'cxx cxxstlib asm',
|
||||
source = "luabindings.cc" ,
|
||||
cxxflags = lua_cxxflags,
|
||||
includes = obj.includes,
|
||||
use = ['libpbd','libmidipp','libevoral',
|
||||
'libtemporal',
|
||||
'liblua',
|
||||
'zita-resampler',
|
||||
'zita-convolver',
|
||||
],
|
||||
uselib = obj.uselib,
|
||||
target = 'luabindings')
|
||||
|
||||
obj.use += ['luabindings' ]
|
||||
|
||||
avx_sources = []
|
||||
fma_sources = []
|
||||
avx512f_sources = []
|
||||
|
@ -63,17 +63,8 @@ export WINRC=${XPREFIX}-windres
|
||||
export RANLIB=${XPREFIX}-ranlib
|
||||
export DLLTOOL=${XPREFIX}-dlltool
|
||||
|
||||
if grep -q optimize <<<"$ARDOURCFG"; then
|
||||
OPT=""
|
||||
else
|
||||
#debug-build luabindings.cc, has > 60k symbols.
|
||||
# -Wa,-mbig-obj has an unreasonable long build-time
|
||||
# -Og to the rescue.
|
||||
OPT=" -Og"
|
||||
fi
|
||||
|
||||
CFLAGS="-mstackrealign$OPT" \
|
||||
CXXFLAGS="-mstackrealign$OPT" \
|
||||
CFLAGS="-mstackrealign" \
|
||||
CXXFLAGS="-mstackrealign" \
|
||||
LDFLAGS="-L${PREFIX}/lib" \
|
||||
DEPSTACK_ROOT="$PREFIX" \
|
||||
./waf configure \
|
||||
|
Loading…
Reference in New Issue
Block a user