[PATCH] D71705: [cmake] Add dependency on llvm-dwarfdump to llvm-locstats
David Spickett via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 19 07:13:31 PST 2019
DavidSpickett created this revision.
DavidSpickett added a reviewer: djtodoro.
Herald added subscribers: llvm-commits, aprantl, mgorny.
Herald added a project: LLVM.
DavidSpickett added a reviewer: dstenb.
Though llvm-covstat is a "util" it requires llvm-dwarfdump
to be useful. So what happens now is that unless LLVM_BUILD_TOOLS
is ON llvm-locstats won't be part of the "all" target.
However given that it requires llvm-dwarfdump, this is less
confusing/build time consuming than suddenly having llvm-dwarfdump
build when all other tools are disabled.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D71705
Files:
llvm/utils/llvm-locstats/CMakeLists.txt
Index: llvm/utils/llvm-locstats/CMakeLists.txt
===================================================================
--- llvm/utils/llvm-locstats/CMakeLists.txt
+++ llvm/utils/llvm-locstats/CMakeLists.txt
@@ -2,11 +2,15 @@
add_custom_command(
OUTPUT ${LLVM_TOOLS_BINARY_DIR}/llvm-locstats
DEPENDS ${LLVM_MAIN_SRC_DIR}/utils/llvm-locstats/llvm-locstats.py
+ DEPENDS llvm-dwarfdump
COMMAND ${CMAKE_COMMAND} -E copy ${LLVM_MAIN_SRC_DIR}/utils/llvm-locstats/llvm-locstats.py ${LLVM_TOOLS_BINARY_DIR}/llvm-locstats
COMMENT "Copying llvm-locstats into ${LLVM_TOOLS_BINARY_DIR}"
)
add_custom_target(llvm-locstats ALL
DEPENDS ${LLVM_TOOLS_BINARY_DIR}/llvm-locstats
)
+ if (NOT LLVM_BUILD_UTILS)
+ set_target_properties(llvm-locstats PROPERTIES EXCLUDE_FROM_ALL ON)
+ endif()
set_target_properties(llvm-locstats PROPERTIES FOLDER "Tools")
endif()
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D71705.234717.patch
Type: text/x-patch
Size: 889 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191219/ed585390/attachment.bin>
More information about the llvm-commits
mailing list