Index: lib/Fuzzer/CMakeLists.txt =================================================================== --- lib/Fuzzer/CMakeLists.txt +++ lib/Fuzzer/CMakeLists.txt @@ -37,6 +37,7 @@ target_link_libraries(LLVMFuzzer ${PTHREAD_LIB}) target_link_libraries(LLVMFuzzer LLVMFuzzerSupport) + add_subdirectory(afl) if( LLVM_INCLUDE_TESTS ) add_subdirectory(test) endif() Index: lib/Fuzzer/afl/CMakeLists.txt =================================================================== --- /dev/null +++ lib/Fuzzer/afl/CMakeLists.txt @@ -0,0 +1,4 @@ +add_library(LLVMFuzzerAflDriver STATIC + afl_driver.cpp + ) +target_link_libraries(LLVMFuzzerAflDriver LLVMFuzzerSupport) Index: lib/Fuzzer/test/no-coverage/CMakeLists.txt =================================================================== --- lib/Fuzzer/test/no-coverage/CMakeLists.txt +++ lib/Fuzzer/test/no-coverage/CMakeLists.txt @@ -18,7 +18,9 @@ ############################################################################### add_executable(AFLDriverTest - ../AFLDriverTest.cpp ../../afl/afl_driver.cpp) + ../AFLDriverTest.cpp) + +target_link_libraries(AFLDriverTest LLVMFuzzerAflDriver) set_target_properties(AFLDriverTest PROPERTIES RUNTIME_OUTPUT_DIRECTORY