diff options
author | Carl Hetherington <carl@carlh.net> | 2011-12-27 00:48:31 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2011-12-27 00:48:31 +0000 |
commit | dfc307801307f21d1db5db2395bce5cb1bc95c84 (patch) | |
tree | 26acacad7b5c61882907df1d91cc18d6bce3a75c /wscript | |
parent | fd48e72fc212a0f7a2cb23a7c39ccc0f76cb7439 (diff) |
Add configure option to raise a FP exception when a denormal
is detected.
git-svn-id: svn://localhost/ardour2/branches/3.0@11086 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'wscript')
-rw-r--r-- | wscript | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -310,6 +310,12 @@ def set_compiler_flags (conf,opt): conf.env.append_value('CXXFLAGS', '-DDEBUG_RT_ALLOC') conf.env.append_value('LINKFLAGS', '-ldl') + print 'bar' + if conf.env['DEBUG_DENORMAL_EXCEPTION']: + print 'foo' + conf.env.append_value('CFLAGS', '-DDEBUG_DENORMAL_EXCEPTION') + conf.env.append_value('CXXFLAGS', '-DDEBUG_DENORMAL_EXCEPTION') + if opt.universal: if not Options.options.nocarbon: conf.env.append_value('CFLAGS', ["-arch", "i386", "-arch", "ppc"]) @@ -387,6 +393,8 @@ def options(opt): 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('--denormal-exception', action='store_true', default=False, dest='denormal_exception', + help='Raise a floating point exception if a denormal is detected') 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', @@ -582,6 +590,10 @@ def configure(conf): conf.env['PROGRAM_NAME'] = opts.program_name if opts.rt_alloc_debug: conf.define('DEBUG_RT_ALLOC', 1) + conf.env['DEBUG_RT_ALLOC'] = True + if opts.denormal_exception: + conf.define('DEBUG_DENORMAL_EXCEPTION', 1) + conf.env['DEBUG_DENORMAL_EXCEPTION'] = True if not conf.is_defined('HAVE_CPPUNIT'): conf.env['BUILD_TESTS'] = False @@ -610,6 +622,8 @@ const char* const ardour_config_info = "\\n\\ write_config_text('AU state support', conf.is_defined('AU_STATE_SUPPORT')) write_config_text('Build target', conf.env['build_target']) write_config_text('CoreAudio', conf.is_defined('HAVE_COREAUDIO')) + write_config_text('Debug RT allocations', conf.is_defined('DEBUG_RT_ALLOC')) + write_config_text('Denormal exceptions', conf.is_defined('DEBUG_DENORMAL_EXCEPTION')) write_config_text('FLAC', conf.is_defined('HAVE_FLAC')) write_config_text('FPU optimization', opts.fpu_optimization) write_config_text('Freedesktop files', opts.freedesktop) |