Skip to content

Commit 95014f5

Browse files
committed
Fix Configure.pl --asan flag on clang
Let clang link in its own version of asan instead of supplying -lasan to the linker. Otherwise there is a version conflict.
1 parent f4dec40 commit 95014f5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Configure.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ ($$)
327327
$config{ldlibs} = join ' ',
328328
(map { sprintf $config{ldusr}, $_; } @{$config{usrlibs}}),
329329
(map { sprintf $config{ldsys}, $_; } @{$config{syslibs}});
330-
$config{ldlibs} = ' -lasan ' . $config{ldlibs} if $args{asan} and $^O ne 'darwin';
330+
$config{ldlibs} = ' -lasan ' . $config{ldlibs} if $args{asan} && $^O ne 'darwin' && $config{cc} ne 'clang';
331331
$config{ldlibs} = ' -lubsan ' . $config{ldlibs} if $args{ubsan} and $^O ne 'darwin';
332332
# macro defs
333333
$config{ccdefflags} = join ' ', map { $config{ccdef} . $_ } @{$config{defs}};

0 commit comments

Comments
 (0)