Skip to content

Commit

Permalink
Use setup_host_tool for clang-ast-dump, fixes 76707
Browse files Browse the repository at this point in the history
  • Loading branch information
JonChesterfield committed Apr 2, 2024
1 parent 68217a5 commit b4adb42
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions clang/lib/Tooling/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,16 @@ else()
list(APPEND implicitDirs -I ${implicitDir})
endforeach()

setup_host_tool(clang-ast-dump CLANG_AST_DUMP clang_ast_dump_exe clang_ast_dump_target)

include(GetClangResourceDir)
get_clang_resource_dir(resource_dir PREFIX ${LLVM_BINARY_DIR})
add_custom_command(
COMMENT Generate ASTNodeAPI.json
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/ASTNodeAPI.json
DEPENDS clang-ast-dump clang-resource-headers
DEPENDS ${clang_ast_dump_target} clang-resource-headers
COMMAND
$<TARGET_FILE:clang-ast-dump>
${clang_ast_dump_exe}
# Skip this in debug mode because parsing AST.h is too slow
--skip-processing=${skip_expensive_processing}
-I ${resource_dir}/include
Expand Down

0 comments on commit b4adb42

Please sign in to comment.