summaryrefslogtreecommitdiff
path: root/wscript
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2011-01-19 21:36:38 +0000
committerCarl Hetherington <carl@carlh.net>2011-01-19 21:36:38 +0000
commit6636a65c100869e1d479cac97769fbaede7746c7 (patch)
treeaee411a92e2453712fb699893d4313ebd4ef7fca /wscript
parent19d1132afb8d1877f7b3e7c1ff27a11503f1b56d (diff)
Configure option to abort when malloc is called in the process thread.
git-svn-id: svn://localhost/ardour2/branches/3.0@8548 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'wscript')
-rw-r--r--wscript10
1 files changed, 9 insertions, 1 deletions
diff --git a/wscript b/wscript
index bf1a1024da..4c86cc37c9 100644
--- a/wscript
+++ b/wscript
@@ -291,6 +291,11 @@ def set_compiler_flags (conf,opt):
if opt.stl_debug:
conf.env.append_value('CXXFLAGS', "-D_GLIBCXX_DEBUG")
+ if conf.env['DEBUG_RT_ALLOC']:
+ conf.env.append_value('CCFLAGS', '-DDEBUG_RT_ALLOC')
+ conf.env.append_value('CXXFLAGS', '-DDEBUG_RT_ALLOC')
+ conf.env.append_value('LINKFLAGS', '-ldl')
+
if opt.universal:
conf.env.append_value('CCFLAGS', "-arch i386 -arch ppc")
conf.env.append_value('CXXFLAGS', "-arch i386 -arch ppc")
@@ -325,7 +330,6 @@ def set_compiler_flags (conf,opt):
conf.env.append_value('CXXFLAGS', '-DENABLE_NLS')
conf.env.append_value('CCFLAGS', '-DENABLE_NLS')
-
#----------------------------------------------------------------
# Waf stages
@@ -359,6 +363,8 @@ def set_options(opt):
opt.add_option('--phone-home', action='store_false', default=True, dest='phone_home')
opt.add_option('--stl-debug', action='store_true', default=False, dest='stl_debug',
help='Build with debugging for the STL')
+ opt.add_option('--rt-alloc-debug', action='store_true', default=False, dest='rt_alloc_debug',
+ help='Build with debugging for memory allocation in the real-time thread')
opt.add_option('--test', action='store_true', default=False, dest='build_tests',
help="Build unit tests")
opt.add_option('--tranzport', action='store_true', default=False, dest='tranzport',
@@ -540,6 +546,8 @@ def configure(conf):
autowaf.display_msg(conf, 'Windows Key', opts.windows_key)
conf.env['PROGRAM_NAME'] = opts.program_name
autowaf.display_msg(conf, 'Program Name', opts.program_name)
+ if opts.rt_alloc_debug:
+ conf.define('DEBUG_RT_ALLOC', 1)
set_compiler_flags (conf, Options.options)