summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Fuzzer
diff options
context:
space:
mode:
authorDan Liew <dan@su-root.co.uk>2016-07-07 18:14:11 +0000
committerDan Liew <dan@su-root.co.uk>2016-07-07 18:14:11 +0000
commit30ca81f1f71e8ac51a517f9d0e731eb8bf3aec04 (patch)
tree2f77f1ab5d6a9c7af60b9adb58c0831126c6a41e /llvm/lib/Fuzzer
parente2467baba8fa58d346083307b9e9b1c0f385a0fa (diff)
downloadbcm5719-llvm-30ca81f1f71e8ac51a517f9d0e731eb8bf3aec04.tar.gz
bcm5719-llvm-30ca81f1f71e8ac51a517f9d0e731eb8bf3aec04.zip
[LibFuzzer] Unbreak the build on macOS which was broken by r272858.
``afl_driver.cpp`` currently relies on weak symbols which doesn't work properly under macOS. For now fix the build by providing a dummy implementation of ``LLVMFuzzerInitialize(...)``. This is just a temporary measure until we fix ``afl_driver.cpp`` for macOS. llvm-svn: 274778
Diffstat (limited to 'llvm/lib/Fuzzer')
-rw-r--r--llvm/lib/Fuzzer/test/AFLDriverTest.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/Fuzzer/test/AFLDriverTest.cpp b/llvm/lib/Fuzzer/test/AFLDriverTest.cpp
index 576c53808b7..3dd0b611730 100644
--- a/llvm/lib/Fuzzer/test/AFLDriverTest.cpp
+++ b/llvm/lib/Fuzzer/test/AFLDriverTest.cpp
@@ -11,6 +11,12 @@ extern "C" int __afl_persistent_loop(unsigned int) {
return 0;
}
+// This declaration exists to prevent the Darwin linker
+// from complaining about this being a missing weak symbol.
+extern "C" int LLVMFuzzerInitialize(int *argc, char ***argv) {
+ return 0;
+}
+
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
return 0;
}
OpenPOWER on IntegriCloud