diff options
| author | Carl Hetherington <cth@carlh.net> | 2024-02-01 01:09:04 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2024-02-01 01:09:04 +0100 |
| commit | 52bb9a6160652104e30ec54032b6c244192a487e (patch) | |
| tree | d15c7db2d8c97528e74f3582ddba2583abf960b6 /wscript | |
| parent | 6a35581ef83d48a799208081bcf006de895ddfb4 (diff) | |
Add --enable-asan option to configure.
Diffstat (limited to 'wscript')
| -rw-r--r-- | wscript | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -78,6 +78,7 @@ def options(opt): opt.add_option('--enable-disk', action='store_true', default=False, help='build dcpomatic2_disk tool; requires Boost process, lwext4 and nanomsg libraries') opt.add_option('--warnings-are-errors', action='store_true', default=False, help='build with -Werror') opt.add_option('--wx-config', help='path to wx-config') + opt.add_option('--enable-asan', action='store_true', help='build with asan') def configure(conf): conf.load('compiler_cxx') @@ -121,6 +122,10 @@ def configure(conf): if not conf.options.target_macos_arm64: conf.env.append_value('CXXFLAGS', '-msse') + if conf.options.enable_asan: + conf.env.append_value('CXXFLAGS', '-fsanitize=address') + conf.env.append_value('LINKFLAGS', '-fsanitize=address') + if conf.env['CXX_NAME'] == 'gcc': gcc = conf.env['CC_VERSION'] if int(gcc[0]) >= 8: |
