diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-01-08 23:27:57 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-01-08 23:27:57 +0000 |
| commit | c6a57fe6abccac8dde49a77d5bfe6943f70e080c (patch) | |
| tree | 53d8657c358011171cd9936e2ac46828d2ae1a9c /wscript | |
| parent | 24334403a364fcaf5b9708fa163c59909fec21fe (diff) | |
Add configure option to use address sanitizer.
Diffstat (limited to 'wscript')
| -rw-r--r-- | wscript | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -15,6 +15,7 @@ def options(opt): opt.add_option('--static', action='store_true', default=False, help='build statically, and link statically to libdcp and FFmpeg') opt.add_option('--magickpp-config', action='store', default='Magick++-config', help='path to Magick++-config') opt.add_option('--wx-config', action='store', default='wx-config', help='path to wx-config') + opt.add_option('--address-sanitizer', action='store_true', default=False, help='build with address sanitizer') def pkg_config_args(conf): if conf.env.STATIC: @@ -43,6 +44,10 @@ def configure(conf): else: conf.env.append_value('CXXFLAGS', '-O2') + if conf.options.address_sanitizer: + conf.env.append_value('CXXFLAGS', ['-fsanitize=address', '-fno-omit-frame-pointer']) + conf.env.append_value('LINKFLAGS', ['-fsanitize=address']) + # Windows-specific if conf.env.TARGET_WINDOWS: conf.env.append_value('CXXFLAGS', ['-DDCPOMATIC_WINDOWS', '-DWIN32_LEAN_AND_MEAN', '-DBOOST_USE_WINDOWS_H', '-DUNICODE', '-DBOOST_THREAD_PROVIDES_GENERIC_SHARED_MUTEX_ON_WIN']) |
