Skip to content

Commit 6f5c8a0

Browse files
committed
meson/build: meson has builtin option 'b_sanitize' to run asan msan and tsan
1 parent 1d4716e commit 6f5c8a0

File tree

2 files changed

+0
-32
lines changed

2 files changed

+0
-32
lines changed

meson.build

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,6 @@ compiler_flags = ['-std=c++14', '-Os', '-Wall', '-Werror', '-Wextra', '-fno-exce
1010
'-fno-unwind-tables' , '-fno-asynchronous-unwind-tables',
1111
'-Wnon-virtual-dtor', '-Woverloaded-virtual', '-Wno-unused-parameter', '-fvisibility=hidden']
1212

13-
if get_option('asan') == true
14-
compiler_flags += ['-fsanitize=address']
15-
add_global_link_arguments('-fsanitize=address', language: 'cpp')
16-
endif
17-
18-
if get_option('msan') == true
19-
compiler_flags += ['-fsanitize=memory']
20-
add_global_link_arguments('-fsanitize=memory', language: 'cpp')
21-
endif
22-
23-
if get_option('tsan') == true
24-
compiler_flags += ['-fsanitize=thread']
25-
add_global_link_arguments('-fsanitize=thread', language: 'cpp')
26-
endif
27-
2813

2914
if (build_machine.system() == 'linux')
3015
compiler_flags += ['-pthread']

meson_options.txt

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,3 @@ option('text',
1313
value: false,
1414
description: 'Enable text module')
1515

16-
17-
option('asan',
18-
type: 'boolean',
19-
value: false,
20-
description: 'Enable address sanitizer')
21-
22-
23-
option('msan',
24-
type: 'boolean',
25-
value: false,
26-
description: 'Enable memory sanitizer')
27-
28-
29-
option('tsan',
30-
type: 'boolean',
31-
value: false,
32-
description: 'Enable thread sanitizer')

0 commit comments

Comments
 (0)