meson/build: meson has builtin option 'b_sanitize' to run asan msan and tsan

This commit is contained in:
subhransu mohanty 2019-06-07 10:58:46 +09:00 committed by Subhransu
parent 1d4716e03d
commit 6f5c8a074d
2 changed files with 0 additions and 32 deletions

View File

@ -10,21 +10,6 @@ compiler_flags = ['-std=c++14', '-Os', '-Wall', '-Werror', '-Wextra', '-fno-exce
'-fno-unwind-tables' , '-fno-asynchronous-unwind-tables',
'-Wnon-virtual-dtor', '-Woverloaded-virtual', '-Wno-unused-parameter', '-fvisibility=hidden']
if get_option('asan') == true
compiler_flags += ['-fsanitize=address']
add_global_link_arguments('-fsanitize=address', language: 'cpp')
endif
if get_option('msan') == true
compiler_flags += ['-fsanitize=memory']
add_global_link_arguments('-fsanitize=memory', language: 'cpp')
endif
if get_option('tsan') == true
compiler_flags += ['-fsanitize=thread']
add_global_link_arguments('-fsanitize=thread', language: 'cpp')
endif
if (build_machine.system() == 'linux')
compiler_flags += ['-pthread']

View File

@ -13,20 +13,3 @@ option('text',
value: false,
description: 'Enable text module')
option('asan',
type: 'boolean',
value: false,
description: 'Enable address sanitizer')
option('msan',
type: 'boolean',
value: false,
description: 'Enable memory sanitizer')
option('tsan',
type: 'boolean',
value: false,
description: 'Enable thread sanitizer')