You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Darwin][Driver] Avoid duplicate -lc++ with -fsanitize=fuzzer
On Darwin, duplicate -l options cause a warning to be printed.
Invoking clang as clang++ and using -fsanitize=fuzzer will
cause -lc++ to be passed twice to the linker, causing a warning.
i.e. AddCXXStdlibLibArgs is called twice in this case:
1) https://github.com/llvm/llvm-project/blob/19c4e86f3e8582c3f087a9fec5ac036838e58ec4/clang/lib/Driver/ToolChains/Darwin.cpp#L743
2) The subject of this PR
Since ShouldLinkCXXStdlib() implies that the linker will already
get the -lc++ argument, we only add the argument if
!ShouldLinkCXXStdlib().
rdar://136431775
0 commit comments