From dd45e25dc332792f9f5dbe09f3014706ac373cf5 Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Wed, 25 Jun 2025 09:18:42 -0700 Subject: [PATCH] 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: --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 622406a7747..9d514581f9c 100644 --- a/meson.build +++ b/meson.build @@ -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)