[llvm] r274778 - [LibFuzzer] Unbreak the build on macOS which was broken by r272858.
Dan Liew via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 7 11:14:11 PDT 2016
Author: delcypher
Date: Thu Jul 7 13:14:11 2016
New Revision: 274778
URL: http://llvm.org/viewvc/llvm-project?rev=274778&view=rev
Log:
[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.
Modified:
llvm/trunk/lib/Fuzzer/test/AFLDriverTest.cpp
Modified: llvm/trunk/lib/Fuzzer/test/AFLDriverTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Fuzzer/test/AFLDriverTest.cpp?rev=274778&r1=274777&r2=274778&view=diff
==============================================================================
--- llvm/trunk/lib/Fuzzer/test/AFLDriverTest.cpp (original)
+++ llvm/trunk/lib/Fuzzer/test/AFLDriverTest.cpp Thu Jul 7 13:14:11 2016
@@ -11,6 +11,12 @@ extern "C" int __afl_persistent_loop(uns
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;
}
More information about the llvm-commits
mailing list