Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lldb / tools / lldb-fuzzer / lldb-commandinterpreter-fuzzer / CMakeLists.txt
blob7eb85ba916709b9e58580e24097654f707c3b24b
1 set(LLVM_LINK_COMPONENTS
2   Support
3   )
5 add_llvm_fuzzer(lldb-commandinterpreter-fuzzer
6   EXCLUDE_FROM_ALL
7   lldb-commandinterpreter-fuzzer.cpp
8   )
10 if(TARGET lldb-commandinterpreter-fuzzer)
11   target_include_directories(lldb-commandinterpreter-fuzzer PRIVATE ..)
12   target_link_libraries(lldb-commandinterpreter-fuzzer
13     PRIVATE
14     liblldb
15     )
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
24     )
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-
30     USES_TERMINAL
31     )
32 endif()