[PATCH] D127943: cmake: configure clang lit to use hmaptool from source directly
Matheus Izvekov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 16 00:23:15 PDT 2022
mizvekov created this revision.
Herald added a subscriber: mgorny.
Herald added a project: All.
mizvekov published this revision for review.
mizvekov added reviewers: dyung, nikic.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
Signed-off-by: Matheus Izvekov <mizvekov at gmail.com>
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D127943
Files:
clang/test/lit.cfg.py
clang/utils/hmaptool/CMakeLists.txt
Index: clang/utils/hmaptool/CMakeLists.txt
===================================================================
--- clang/utils/hmaptool/CMakeLists.txt
+++ clang/utils/hmaptool/CMakeLists.txt
@@ -1,14 +1,5 @@
-# FIXME: ideally we would just provide CURRENT_TOOLS_DIR globally instead of
-# computing it just for function(configure_lit_site_cfg)
-set_llvm_build_mode()
-string(REPLACE "${CMAKE_CFG_INTDIR}" "${LLVM_BUILD_MODE}" CURRENT_TOOLS_DIR "${LLVM_RUNTIME_OUTPUT_INTDIR}")
-
-add_custom_command(OUTPUT "${CURRENT_TOOLS_DIR}/hmaptool"
- COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_CURRENT_SOURCE_DIR}/hmaptool" "${CURRENT_TOOLS_DIR}"
- DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/hmaptool")
-
install(PROGRAMS hmaptool DESTINATION "${LLVM_TOOLS_INSTALL_DIR}" COMPONENT hmaptool)
-add_custom_target(hmaptool ALL DEPENDS "${CURRENT_TOOLS_DIR}/hmaptool")
+add_custom_target(hmaptool ALL DEPENDS "hmaptool")
set_target_properties(hmaptool PROPERTIES FOLDER "Utils")
if(NOT LLVM_ENABLE_IDE)
Index: clang/test/lit.cfg.py
===================================================================
--- clang/test/lit.cfg.py
+++ clang/test/lit.cfg.py
@@ -111,7 +111,7 @@
config.substitutions.append(
('%hmaptool', "'%s' %s" % (config.python_executable,
- os.path.join(config.clang_tools_dir, 'hmaptool'))))
+ os.path.join(config.clang_src_dir, 'utils', 'hmaptool', 'hmaptool'))))
config.substitutions.append(
('%deps-to-rsp',
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D127943.437457.patch
Type: text/x-patch
Size: 1526 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220616/5bc0cb35/attachment-0001.bin>
More information about the cfe-commits
mailing list