Reland "[libFuzzer] Support using libc++"
This is needed in case the users of libFuzzer use libc++ in their
code, which the fuzz target (libFuzzer) will be linked against.
When libc++ source is available, we build a private version of it
and link it against libFuzzer which allows using the same static
library against codebases which use both libc++ and libstdc++.
Differential Revision: https://reviews.llvm.org/D37631
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk/lib/fuzzer@322755 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/FuzzerMain.cpp b/FuzzerMain.cpp
index af86572..f2c8e9c 100644
--- a/FuzzerMain.cpp
+++ b/FuzzerMain.cpp
@@ -16,6 +16,6 @@
int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size);
} // extern "C"
-int main(int argc, char **argv) {
+__attribute__((visibility("default"))) int main(int argc, char **argv) {
return fuzzer::FuzzerDriver(&argc, &argv, LLVMFuzzerTestOneInput);
}