meson: update b_sanitize check for Meson >= 1.8

In Meson 1.8 the b_sanitize option was changed from an enumerated set of
known sanitizers to an array of options to test with `-fsanitize`, this
means that the thread sanitizer could be used in conjunction with one
or more other sanitizers and we need to account for this. Use
`.contains()` to check if `thread` is in the sanitizer list

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35747>
This commit is contained in:
Dylan Baker 2025-06-25 09:18:42 -07:00 committed by Marge Bot
parent 5cfaa6cd5f
commit dd45e25dc3

View file

@ -1913,7 +1913,7 @@ endif
# ThreadSanitizer can't deal with futexes, and reports races for cases we don't care about
# so add a define to work silence these issues.
if get_option('b_sanitize') == 'thread'
if get_option('b_sanitize').contains('thread')
pre_args += '-DTHREAD_SANITIZER=1'
tsan_blacklist = '-fsanitize-blacklist=@0@'.format(join_paths(meson.project_source_root(), 'build-support', 'tsan-blacklist.txt'))
if cc.has_argument(tsan_blacklist)