diff --git a/Configurations/shared-info.pl b/Configurations/shared-info.pl index 83f28bd367..2e2d28d95e 100644 --- a/Configurations/shared-info.pl +++ b/Configurations/shared-info.pl @@ -33,9 +33,9 @@ my %shared_info; %{$shared_info{'gnu-shared'}}, shared_defflag => '-Wl,--version-script=', dso_ldflags => - $disabled{asan} && $disabled{msan} && $disabled{ubsan} - ? '-z defs' - : '', + (grep /(?:^|\s)-fsanitize/, @{$config{CFLAGS}}) + ? '' + : '-z defs', }; }, 'bsd-gcc-shared' => sub { return $shared_info{'linux-shared'}; },