diff options
author | Jack Lloyd <[email protected]> | 2015-07-05 22:16:29 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2015-07-05 22:16:29 -0400 |
commit | 8db5746d4c83d9ef8e02aeee5092950ab9407604 (patch) | |
tree | 533516b947288511d4a8bb1b47aa4e813022d8d7 /configure.py | |
parent | d84516a2b77c8754344d54fcd067e57c156eb4ac (diff) |
Make sanitizer a build mode for easy use by developers.
Diffstat (limited to 'configure.py')
-rwxr-xr-x | configure.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/configure.py b/configure.py index b8fb3185f..7eb584c4f 100755 --- a/configure.py +++ b/configure.py @@ -280,10 +280,10 @@ def process_command_line(args): build_group = optparse.OptionGroup(parser, 'Build options') - modes = ['release', 'debug', 'coverage'] + build_modes = ['release', 'debug', 'coverage', 'sanitizer'] build_group.add_option('--build-mode', default='release', metavar='MODE', - choices=modes, - help="Build mode (one of %s; default %%default)" % (', '.join(modes))) + choices=build_modes, + help="Build mode (one of %s; default %%default)" % (', '.join(build_modes))) build_group.add_option('--debug-mode', action='store_const', const='debug', dest='build_mode', @@ -802,6 +802,7 @@ class CompilerInfo(object): 'debug_flags': '', 'no_debug_flags': '', 'coverage_flags': '', + 'sanitizer_flags': '', 'shared_flags': '', 'lang_flags': '', 'warning_flags': '', @@ -886,6 +887,10 @@ class CompilerInfo(object): if self.coverage_flags == '': raise Exception('No coverage handling for %s' % (self.basename)) return ' ' + self.coverage_flags + ' ' + abi_flags + elif options.build_mode == 'sanitizer': + if self.sanitizer_flags == '': + raise Exception('No sanitizer handling for %s' % (self.basename)) + return ' ' + self.sanitizer_flags + ' ' + abi_flags return ' ' + abi_flags |