From 30ca81f1f71e8ac51a517f9d0e731eb8bf3aec04 Mon Sep 17 00:00:00 2001 From: Dan Liew Date: Thu, 7 Jul 2016 18:14:11 +0000 Subject: [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 --- llvm/lib/Fuzzer/test/AFLDriverTest.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'llvm/lib') 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; } -- cgit v1.2.3