diff options
author | Andrew Haberlandt <ndrewh@users.noreply.github.com> | 2025-10-09 01:38:27 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-10-09 09:38:27 +0100 |
commit | 9abb344e572e165f01d7789522113d9a4d8b0ca6 (patch) | |
tree | b4b283cdc62383396fe1111d380e195675aed552 /llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp | |
parent | daf81a6c0849c797cb28a505826ec22c8c7e4db6 (diff) | |
download | llvm-9abb344e572e165f01d7789522113d9a4d8b0ca6.zip llvm-9abb344e572e165f01d7789522113d9a4d8b0ca6.tar.gz llvm-9abb344e572e165f01d7789522113d9a4d8b0ca6.tar.bz2 |
[Darwin][Driver] Avoid duplicate -lc++ with -fsanitize=fuzzer (#161304)
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
because `ShouldLinkCXXStdlib(Args)` is true.
2) The subject of this PR
We now skip adding the -lc++ argument if `ShouldLinkCXXStdlib(Args)`
(since that means the other path already added it).
rdar://136431775
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp')
0 files changed, 0 insertions, 0 deletions