1 set(LLVM_LINK_COMPONENTS
5 add_llvm_fuzzer(lldb-commandinterpreter-fuzzer
7 lldb-commandinterpreter-fuzzer.cpp
10 if(TARGET lldb-commandinterpreter-fuzzer)
11 target_include_directories(lldb-commandinterpreter-fuzzer PRIVATE ..)
12 target_link_libraries(lldb-commandinterpreter-fuzzer
17 # A directory in the build directory is created to hold the fuzzer's
18 # artifacts as a pre-build command for the command interpreter's executable
19 # target. When the fuzzer exits the input artifact that caused it to exit
20 # will be written to this directory.
22 add_custom_command(TARGET lldb-commandinterpreter-fuzzer PRE_BUILD
23 COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/fuzzer-artifacts/commandinterpreter-artifacts
26 add_custom_target(fuzz-lldb-commandinterpreter
27 COMMENT "Running the LLDB command interpreter fuzzer..."
28 WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/fuzzer-artifacts/commandinterpreter-artifacts
29 COMMAND $<TARGET_FILE:lldb-commandinterpreter-fuzzer> -dict=${CMAKE_CURRENT_SOURCE_DIR}/inputdictionary.txt -only_ascii=1 -artifact_prefix=commandinterpreter-