[PATCH] D38812: [clang-fuzzer] Allow linking with any fuzzing engine.
Matt Morehouse via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 11 11:29:44 PDT 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL315486: [clang-fuzzer] Allow linking with any fuzzing engine. (authored by morehouse).
Changed prior to commit:
https://reviews.llvm.org/D38812?vs=118651&id=118655#toc
Repository:
rL LLVM
https://reviews.llvm.org/D38812
Files:
cfe/trunk/tools/clang-fuzzer/CMakeLists.txt
Index: cfe/trunk/tools/clang-fuzzer/CMakeLists.txt
===================================================================
--- cfe/trunk/tools/clang-fuzzer/CMakeLists.txt
+++ cfe/trunk/tools/clang-fuzzer/CMakeLists.txt
@@ -1,7 +1,9 @@
set(LLVM_LINK_COMPONENTS ${LLVM_TARGETS_TO_BUILD} FuzzMutate)
set(CXX_FLAGS_NOFUZZ ${CMAKE_CXX_FLAGS})
set(DUMMY_MAIN DummyClangFuzzer.cpp)
-if(LLVM_USE_SANITIZE_COVERAGE)
+if(DEFINED LIB_FUZZING_ENGINE)
+ unset(DUMMY_MAIN)
+elseif(LLVM_USE_SANITIZE_COVERAGE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=fuzzer")
set(CXX_FLAGS_NOFUZZ "${CXX_FLAGS_NOFUZZ} -fsanitize=fuzzer-no-link")
unset(DUMMY_MAIN)
@@ -48,6 +50,7 @@
target_link_libraries(clang-proto-fuzzer
${ProtobufMutator_LIBRARIES}
${PROTOBUF_LIBRARIES}
+ ${LIB_FUZZING_ENGINE}
clangCXXProto
clangHandleCXX
clangProtoToCXX
@@ -63,5 +66,6 @@
)
target_link_libraries(clang-fuzzer
+ ${LIB_FUZZING_ENGINE}
clangHandleCXX
)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D38812.118655.patch
Type: text/x-patch
Size: 971 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20171011/2cf248fe/attachment.bin>
More information about the cfe-commits
mailing list