<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/102630>102630</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
`-fsanitize=fuzzer` causes "ld: warning: ignoring duplicate libraries: '-lc++'"
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
hebasto
</td>
</tr>
</table>
<pre>
On macOS Sonoma (arm64), using binaries from [LLVM 17.0.6 Release](https://github.com/llvm/llvm-project/releases/tag/llvmorg-17.0.6):
```
% cat test.cpp
int main() {}
% /opt/clang-17.0.6/bin/clang++ -L/opt/clang-17.0.6/lib -L/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib -o test test.cpp
ld: warning: reexported library with install name '@rpath/libunwind.1.dylib' found at '/opt/clang-17.0.6/lib/libunwind.1.0.dylib' couldn't be matched with any parent library and will be linked directly
% /opt/clang-17.0.6/bin/clang++ -fsanitize=fuzzer -L/opt/clang-17.0.6/lib -L/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib -o test test.cpp
ld: warning: ignoring duplicate libraries: '-lc++'
ld: warning: reexported library with install name '@rpath/libunwind.1.dylib' found at '/opt/clang-17.0.6/lib/libunwind.1.0.dylib' couldn't be matched with
```
The same issue is reproducible with the `llvm`, `llvm@17`, and `llvm@16` [packages](https://formulae.brew.sh/formula/llvm) installed via the Homebrew package manager.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzUVEFv4zYT_TXjCxGBGsuSddAhWUP4gM-LBZpF0etIHEtsKFIgqbjOry9oOXFRZA9tLy0gkOKQM5z3hvMoBD1Y5gZ2T7A7bGiJo_PNyB2F6DadU5fmmxUT9d-exbOzbiIBuCc_lQVgDfhFLEHbQXTaktccxMm7ScDu6Xj8-avIq0xmpfiJDVNg2B0A92OMc4DtI2AL2A46jkuX9W4CbI15fZ8eZu9-5T4Ctn71DoBtpOG27_zwsEZPaWwfQR5APkIpb9-6xJ3oKYrIIWb9PIvVrG0UE2kLuAesBVRPUB3uHoCtm9PFvSF7v6XtksdqBHwCfBIPxx-dNbpbd4-68-QvgO2BX9m4mT1g-8VNE1l11Ja_O2cStOfD_9P0NTH9SxbUC2C7BP8ey11BfCBZszUKto_iTN5qO6Rfz_zb7HxkJcx6sTjrOAptQyRjhKWJBWAFhfQzxXGNvtiztirLM3UxugOsxMktVgmK17M_hvgnd3kP0LvFKAtYRdGxmCj2I6s1F7IXMZNnGz9yJJv2jElnjbYvrITSnvtoLn-rLKdAVkf9xrA9nJa3N_b_vlLpwTqfOkcts9E9Rb7RoTl1R2L-wfQrolSF_27BP2_N6_h9ZBFSijqEJY3C8-ydWnrdGV7d48gCSnnVhlImxXlfFTKvbqb0gv5gLqGUSYRm6l9o4PCZ8pycnxZDnHWez1kY76YPJarfeWQlXjVdU_mfmzh5iFtsMZGlgX22Uc1W1duaNtzkFW4xLyvcb8amJupzpJLLk6wKln3ZI9Y7VEVX7PZ1udENSizkXtb5Lt8X-6yvOVdcbsu8wjrP91BInkibLKWVOT9srnw1ucRyKzeGOjbhKuGIls8rm4CYFN03VzntliFAIY0OMdzDRB0NN1DKT1omUdjTEjgIQPzH7xdxs3jT_GX1v2JJ7XYD-9rg7wEAAP__lWsZdQ">