Skip to content
Snippets Groups Projects
Commit 5a2da7d7 authored by Ryan Gonzalez's avatar Ryan Gonzalez
Browse files

build: Refactor sanitizer detection


Splitting the list first instead of matching on strings is a bit easier
to understand but also makes it easier to add other related tests later
on.

steamrt/tasks#677

Signed-off-by: default avatarRyan Gonzalez <ryan.gonzalez@collabora.com>
parent ffd2bb4e
No related branches found
No related tags found
1 merge request!796build: Disable -fsanitize=function when building with UBSan
......@@ -201,11 +201,20 @@ silence_wflinfo_warnings = c_compiler.get_supported_arguments([
'-Wno-switch-default',
])
enabled_sanitizers = get_option('b_sanitize').split(',')
# wflinfo with libwaffle 1.8.0 appears to have a leak from
# wegl_display_init(), which we don't particularly care about for a
# short-lived process
if ['undefined', 'address,undefined'].contains(get_option('b_sanitize'))
no_leak_sanitizer = ['b_sanitize=undefined']
no_leak_sanitizer = []
foreach sanitizer : enabled_sanitizers
if sanitizer != 'address'
no_leak_sanitizer += [sanitizer]
endif
endforeach
if no_leak_sanitizer.length() > 0
no_leak_sanitizer = ['b_sanitize=' + ','.join(no_leak_sanitizer)]
else
no_leak_sanitizer = ['b_sanitize=none']
endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment