[PATCH] D37631: [libFuzzer] Support using libc++
Matt Morehouse via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 12 09:18:14 PST 2018
morehouse added a comment.
`check-fuzzer` tests clean for me now with both clang and gcc.
================
Comment at: lib/fuzzer/FuzzerInterface.h:67
+ __attribute__((visibility("default")));
#ifdef __cplusplus
----------------
AFAICT, all libFuzzer code puts attributes before the function name. Could you follow that convention please?
================
Comment at: test/fuzzer/lit.cfg:57
+ else:
+ link_cmd = '-lc++' if 'darwin' in config.target_triple else '-lstdc++'
std_cmd = '-std=c++11' if is_cpp else ''
----------------
phosek wrote:
> morehouse wrote:
> > What is the difference between `-stdlib=libc++` and `-lc++`? Why does the original code use `-lc++` instead?
> `-stdlib=libc++` is handled by the driver which sets up the header include paths (i.e. the C++ library header path which is different for lib++ and stdlibc++) appropriately and adds all necessary libraries which could be more than just `-lc++`, e.g. `-lc++abi` or `-lunwind`. I don't know why the original code is setting the library explicitly since this should normally be handled by the driver appropriately for each host.
Now we are specifying both `-stdlib=libc++` and `-lc++`. Why is `-lc++` necessary now?
Repository:
rCRT Compiler Runtime
https://reviews.llvm.org/D37631
More information about the llvm-commits
mailing list