[Lldb-commits] [PATCH] D128450: [lldb/Fuzzer] Have target fuzzer write artifacts to specific directory

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Jun 23 09:11:32 PDT 2022


JDevlieghere requested changes to this revision.
JDevlieghere added a comment.
This revision now requires changes to proceed.

Instead of bundling together multiple shell commands into a single one, you should break them down so CMake can have the build system (e.g. ninja) schedule the different parts of it.

To create the directory, you can either create a separate target and make the `fuzz-lldb-target` depend on it:

  add_custom_target(foo ALL
      COMMAND ${CMAKE_COMMAND} -E make_directory ${directory})

But even better would. be to make it a pre-build command for the fuzz-lldb-target:

  add_custom_command(TARGET fuzz-lldb-target PRE_BUILD COMMAND ${CMAKE_COMMAND} -E make_directory ${directory})

Then you can avoid the `cd` by using the `WORKING_DIRECTORY` in `add_custom_target`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D128450/new/

https://reviews.llvm.org/D128450



More information about the lldb-commits mailing list