Skip to content

Commit b4adb42

Browse files
Use setup_host_tool for clang-ast-dump, fixes 76707
1 parent 68217a5 commit b4adb42

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

clang/lib/Tooling/CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,16 @@ else()
5353
list(APPEND implicitDirs -I ${implicitDir})
5454
endforeach()
5555

56+
setup_host_tool(clang-ast-dump CLANG_AST_DUMP clang_ast_dump_exe clang_ast_dump_target)
57+
5658
include(GetClangResourceDir)
5759
get_clang_resource_dir(resource_dir PREFIX ${LLVM_BINARY_DIR})
5860
add_custom_command(
5961
COMMENT Generate ASTNodeAPI.json
6062
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/ASTNodeAPI.json
61-
DEPENDS clang-ast-dump clang-resource-headers
63+
DEPENDS ${clang_ast_dump_target} clang-resource-headers
6264
COMMAND
63-
$<TARGET_FILE:clang-ast-dump>
65+
${clang_ast_dump_exe}
6466
# Skip this in debug mode because parsing AST.h is too slow
6567
--skip-processing=${skip_expensive_processing}
6668
-I ${resource_dir}/include

0 commit comments

Comments
 (0)