mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-16 19:30:29 +00:00
meson/build: meson has builtin option 'b_sanitize' to run asan msan and tsan
This commit is contained in:
parent
1d4716e03d
commit
6f5c8a074d
15
meson.build
15
meson.build
@ -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']
|
||||
|
||||
@ -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')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user