Skip to content

-fsanitize=fuzzer causes "ld: warning: ignoring duplicate libraries: '-lc++'" #102630

Open
@hebasto

Description

@hebasto

On macOS Sonoma (arm64), using binaries from LLVM 17.0.6 Release:

% 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 installed via the Homebrew package manager.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions