meson: Disable flags not compatible with sanitizers if enabled

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9151>
This commit is contained in:
Doug Nazar 2025-05-30 19:17:38 -04:00 committed by GStreamer Marge Bot
parent 13f3656b7b
commit 12c08027b2

View File

@ -154,7 +154,8 @@ if cc.has_argument('-fvisibility=hidden')
endif
# Don't export any symbols from static ffmpeg libraries
if cc.has_link_argument('-Wl,--exclude-libs=ALL')
# This also excludes the sanitizer libraries so disable if a sanitizer is enabled
if get_option('b_sanitize') == 'none' and cc.has_link_argument('-Wl,--exclude-libs=ALL')
add_project_link_arguments('-Wl,--exclude-libs=ALL', language: 'c')
endif