[PATCH] D84947: Add libFuzzer shared object build output
Matt Morehouse via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 5 12:00:19 PDT 2020
morehouse added inline comments.
================
Comment at: compiler-rt/lib/fuzzer/CMakeLists.txt:192
+ set(LIBFUZZER_SHARED_LINK_LIBS ${SANITIZER_COMMON_LINK_LIBS})
+ list(APPEND LIBFUZZER_SHARED_LINK_LIBS "-lstdc++")
+ list(APPEND LIBFUZZER_SHARED_LINK_LIBS "-lm")
----------------
jfb wrote:
> This is broken on non-Linux and non-Fuchsia architectures which don't have libstdc++, for example Darwin. Can you please fix or revert?
Would it be sufficient to add the following?
```
if (DARWIN)
list(APPEND LIBFUZZER_SHARED_LINK_LIBS "-lc++")
else()
list(APPEND LIBFUZZER_SHARED_LINK_LIBS "-lstdc++")
endif()
```
Or are there more platforms that are missing libstdc++?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D84947/new/
https://reviews.llvm.org/D84947
More information about the llvm-commits
mailing list