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 <mizve...@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',


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',
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to