[PATCH] D132883: [cmake] Don't include symlinks to tools in Build-all when `LLVM_BUILD_TOOLS` is off
Markus Böck via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 30 05:03:14 PDT 2022
zero9178 updated this revision to Diff 456617.
zero9178 edited the summary of this revision.
zero9178 added a comment.
Change approach to querying `EXCLUDE_FROM_ALL` property of the target and using it to determine whether the resulting symlink should be included in a Build-all built.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D132883/new/
https://reviews.llvm.org/D132883
Files:
llvm/cmake/modules/AddLLVM.cmake
Index: llvm/cmake/modules/AddLLVM.cmake
===================================================================
--- llvm/cmake/modules/AddLLVM.cmake
+++ llvm/cmake/modules/AddLLVM.cmake
@@ -2135,7 +2135,13 @@
add_custom_command(OUTPUT ${output_path}
COMMAND ${CMAKE_COMMAND} -E ${LLVM_LINK_OR_COPY} "${dest_binary}" "${output_path}"
DEPENDS ${target})
- add_custom_target(${target_name} ALL DEPENDS ${target} ${output_path})
+
+ set(should_build_all)
+ get_target_property(target_excluded_from_all ${target} EXCLUDE_FROM_ALL)
+ if (NOT target_excluded_from_all)
+ set(should_build_all ALL)
+ endif()
+ add_custom_target(${target_name} ${should_build_all} DEPENDS ${target} ${output_path})
set_target_properties(${target_name} PROPERTIES FOLDER Tools)
# Make sure both the link and target are toolchain tools
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D132883.456617.patch
Type: text/x-patch
Size: 888 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220830/f56b8b49/attachment.bin>
More information about the llvm-commits
mailing list