[clang] 0bb317b - Revert "[cmake] Don't export `LLVM_TOOLS_INSTALL_DIR` anymore"

John Ericson via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 10 12:26:23 PDT 2022


Author: John Ericson
Date: 2022-06-10T19:26:12Z
New Revision: 0bb317b7bff3d4f70bddd03a1f337c3f2a118943

URL: https://github.com/llvm/llvm-project/commit/0bb317b7bff3d4f70bddd03a1f337c3f2a118943
DIFF: https://github.com/llvm/llvm-project/commit/0bb317b7bff3d4f70bddd03a1f337c3f2a118943.diff

LOG: Revert "[cmake] Don't export `LLVM_TOOLS_INSTALL_DIR` anymore"

This reverts commit d5daa5c5b091cafb9b7ffd19b5dfa2daadef3229.

Added: 
    

Modified: 
    bolt/tools/CMakeLists.txt
    bolt/tools/driver/CMakeLists.txt
    bolt/tools/heatmap/CMakeLists.txt
    bolt/tools/merge-fdata/CMakeLists.txt
    clang/CMakeLists.txt
    clang/cmake/modules/AddClang.cmake
    flang/CMakeLists.txt
    flang/cmake/modules/AddFlang.cmake
    lld/CMakeLists.txt
    lld/cmake/modules/AddLLD.cmake
    llvm/cmake/modules/AddLLVM.cmake
    llvm/cmake/modules/CMakeLists.txt
    llvm/cmake/modules/LLVMConfig.cmake.in
    llvm/cmake/modules/TableGen.cmake
    mlir/CMakeLists.txt
    mlir/cmake/modules/AddMLIR.cmake
    mlir/tools/mlir-cpu-runner/CMakeLists.txt
    mlir/tools/mlir-linalg-ods-gen/CMakeLists.txt
    mlir/tools/mlir-lsp-server/CMakeLists.txt
    mlir/tools/mlir-opt/CMakeLists.txt
    mlir/tools/mlir-pdll-lsp-server/CMakeLists.txt
    mlir/tools/mlir-reduce/CMakeLists.txt
    mlir/tools/mlir-spirv-cpu-runner/CMakeLists.txt
    mlir/tools/mlir-translate/CMakeLists.txt
    mlir/tools/mlir-vulkan-runner/CMakeLists.txt
    mlir/tools/tblgen-lsp-server/CMakeLists.txt
    openmp/libomptarget/tools/CMakeLists.txt
    openmp/libomptarget/tools/deviceinfo/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/bolt/tools/CMakeLists.txt b/bolt/tools/CMakeLists.txt
index 91b00a5438af3..1fe85145d79a1 100644
--- a/bolt/tools/CMakeLists.txt
+++ b/bolt/tools/CMakeLists.txt
@@ -1,17 +1,3 @@
-set(BOLT_TOOLS_INSTALL_DIR "${CMAKE_INSTALL_BINDIR}" CACHE PATH
-    "Path for binary subdirectory (defaults to '${CMAKE_INSTALL_BINDIR}')")
-mark_as_advanced(BOLT_TOOLS_INSTALL_DIR)
-
-# Move these macros to AddBolt if such a CMake module is ever created.
-
-macro(add_bolt_tool name)
-  llvm_add_tool(BOLT ${ARGV})
-endmacro()
-
-macro(add_bolt_tool_symlink name)
-  llvm_add_tool_symlink(BOLT ${ARGV})
-endmacro()
-
 add_subdirectory(driver)
 add_subdirectory(llvm-bolt-fuzzer)
 add_subdirectory(merge-fdata)

diff  --git a/bolt/tools/driver/CMakeLists.txt b/bolt/tools/driver/CMakeLists.txt
index e56be15dbcff6..2338ccec11d2b 100644
--- a/bolt/tools/driver/CMakeLists.txt
+++ b/bolt/tools/driver/CMakeLists.txt
@@ -11,7 +11,7 @@ else()
   set(BOLT_DRIVER_DEPS "")
 endif()
 
-add_bolt_tool(llvm-bolt
+add_llvm_tool(llvm-bolt
   llvm-bolt.cpp
 
   DEPENDS
@@ -25,8 +25,8 @@ target_link_libraries(llvm-bolt
   LLVMBOLTUtils
   )
 
-add_bolt_tool_symlink(perf2bolt llvm-bolt)
-add_bolt_tool_symlink(llvm-bolt
diff  llvm-bolt)
+add_llvm_tool_symlink(perf2bolt llvm-bolt)
+add_llvm_tool_symlink(llvm-bolt
diff  llvm-bolt)
 
 set(BOLT_DEPENDS
   llvm-bolt

diff  --git a/bolt/tools/heatmap/CMakeLists.txt b/bolt/tools/heatmap/CMakeLists.txt
index cb8e7ee2605c4..820b268125e85 100644
--- a/bolt/tools/heatmap/CMakeLists.txt
+++ b/bolt/tools/heatmap/CMakeLists.txt
@@ -5,7 +5,7 @@ set(LLVM_LINK_COMPONENTS
   Support
   )
 
-add_bolt_tool(llvm-bolt-heatmap
+add_llvm_tool(llvm-bolt-heatmap
   heatmap.cpp
   )
 

diff  --git a/bolt/tools/merge-fdata/CMakeLists.txt b/bolt/tools/merge-fdata/CMakeLists.txt
index 08b2e65b1bce8..2de2ede8f2b5c 100644
--- a/bolt/tools/merge-fdata/CMakeLists.txt
+++ b/bolt/tools/merge-fdata/CMakeLists.txt
@@ -1,6 +1,6 @@
 set(LLVM_LINK_COMPONENTS Support)
 
-add_bolt_tool(merge-fdata
+add_llvm_tool(merge-fdata
   merge-fdata.cpp
 
   DEPENDS

diff  --git a/clang/CMakeLists.txt b/clang/CMakeLists.txt
index c27beec313d78..191f4f2af242a 100644
--- a/clang/CMakeLists.txt
+++ b/clang/CMakeLists.txt
@@ -366,10 +366,6 @@ endif()
 # The libdir suffix must exactly match whatever LLVM's configuration used.
 set(CLANG_LIBDIR_SUFFIX "${LLVM_LIBDIR_SUFFIX}")
 
-set(CLANG_TOOLS_INSTALL_DIR "${CMAKE_INSTALL_BINDIR}" CACHE PATH
-    "Path for binary subdirectory (defaults to '${CMAKE_INSTALL_BINDIR}')")
-mark_as_advanced(CLANG_TOOLS_INSTALL_DIR)
-
 set(CLANG_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
 set(CLANG_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
 

diff  --git a/clang/cmake/modules/AddClang.cmake b/clang/cmake/modules/AddClang.cmake
index c58af0b26a8e5..299f8ce6e2fb4 100644
--- a/clang/cmake/modules/AddClang.cmake
+++ b/clang/cmake/modules/AddClang.cmake
@@ -173,9 +173,9 @@ macro(add_clang_tool name)
 endmacro()
 
 macro(add_clang_symlink name dest)
-  llvm_add_tool_symlink(CLANG ${name} ${dest} ALWAYS_GENERATE)
+  add_llvm_tool_symlink(${name} ${dest} ALWAYS_GENERATE)
   # Always generate install targets
-  llvm_install_symlink(CLANG name} ${dest} ALWAYS_GENERATE)
+  llvm_install_symlink(${name} ${dest} ALWAYS_GENERATE)
 endmacro()
 
 function(clang_target_link_libraries target type)

diff  --git a/flang/CMakeLists.txt b/flang/CMakeLists.txt
index 7e0aec2bf0909..e6ebd26203a10 100644
--- a/flang/CMakeLists.txt
+++ b/flang/CMakeLists.txt
@@ -203,11 +203,6 @@ else()
   include_directories(SYSTEM ${MLIR_INCLUDE_DIR})
   include_directories(SYSTEM ${MLIR_TABLEGEN_OUTPUT_DIR})
 endif()
-
-set(FLANG_TOOLS_INSTALL_DIR "${CMAKE_INSTALL_BINDIR}" CACHE PATH
-    "Path for binary subdirectory (defaults to '${CMAKE_INSTALL_BINDIR}')")
-mark_as_advanced(FLANG_TOOLS_INSTALL_DIR)
-
 set(FLANG_INTRINSIC_MODULES_DIR ${CMAKE_BINARY_DIR}/include/flang)
 set(FLANG_INCLUDE_DIR ${FLANG_BINARY_DIR}/include)
 

diff  --git a/flang/cmake/modules/AddFlang.cmake b/flang/cmake/modules/AddFlang.cmake
index 7c71d2b7b044c..f6fc2ac363fc5 100644
--- a/flang/cmake/modules/AddFlang.cmake
+++ b/flang/cmake/modules/AddFlang.cmake
@@ -122,8 +122,8 @@ macro(add_flang_tool name)
 endmacro()
 
 macro(add_flang_symlink name dest)
-  llvm_add_tool_symlink(FLANG ${name} ${dest} ALWAYS_GENERATE)
+  add_llvm_tool_symlink(${name} ${dest} ALWAYS_GENERATE)
   # Always generate install targets
-  llvm_install_symlink(FLANG ${name} ${dest} ALWAYS_GENERATE)
+  llvm_install_symlink(${name} ${dest} ALWAYS_GENERATE)
 endmacro()
 

diff  --git a/lld/CMakeLists.txt b/lld/CMakeLists.txt
index 34ce965fae496..f51c864af8375 100644
--- a/lld/CMakeLists.txt
+++ b/lld/CMakeLists.txt
@@ -156,10 +156,6 @@ if(LLD_BUILT_STANDALONE)
   endif()
 endif() # standalone
 
-set(LLD_TOOLS_INSTALL_DIR "${CMAKE_INSTALL_BINDIR}" CACHE PATH
-    "Path for binary subdirectory (defaults to '${CMAKE_INSTALL_BINDIR}')")
-mark_as_advanced(LLD_TOOLS_INSTALL_DIR)
-
 set(LLD_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
 set(LLD_INCLUDE_DIR ${LLD_SOURCE_DIR}/include )
 set(LLD_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})

diff  --git a/lld/cmake/modules/AddLLD.cmake b/lld/cmake/modules/AddLLD.cmake
index d3924f7243d40..dd2898ce62364 100644
--- a/lld/cmake/modules/AddLLD.cmake
+++ b/lld/cmake/modules/AddLLD.cmake
@@ -60,7 +60,7 @@ macro(add_lld_tool name)
 endmacro()
 
 macro(add_lld_symlink name dest)
-  llvm_add_tool_symlink(LLD ${name} ${dest} ALWAYS_GENERATE)
+  add_llvm_tool_symlink(${name} ${dest} ALWAYS_GENERATE)
   # Always generate install targets
-  llvm_install_symlink(LLD ${name} ${dest} ALWAYS_GENERATE)
+  llvm_install_symlink(${name} ${dest} ALWAYS_GENERATE)
 endmacro()

diff  --git a/llvm/cmake/modules/AddLLVM.cmake b/llvm/cmake/modules/AddLLVM.cmake
index b5b9ba328208b..8e1385e90b82d 100644
--- a/llvm/cmake/modules/AddLLVM.cmake
+++ b/llvm/cmake/modules/AddLLVM.cmake
@@ -1275,7 +1275,7 @@ if(NOT LLVM_TOOLCHAIN_TOOLS)
     )
 endif()
 
-macro(llvm_add_tool project name)
+macro(add_llvm_tool name)
   if( NOT LLVM_BUILD_TOOLS )
     set(EXCLUDE_FROM_ALL ON)
   endif()
@@ -1286,7 +1286,7 @@ macro(llvm_add_tool project name)
       get_target_export_arg(${name} LLVM export_to_llvmexports)
       install(TARGETS ${name}
               ${export_to_llvmexports}
-              RUNTIME DESTINATION ${${project}_TOOLS_INSTALL_DIR}
+              RUNTIME DESTINATION ${LLVM_TOOLS_INSTALL_DIR}
               COMPONENT ${name})
 
       if (NOT LLVM_ENABLE_IDE)
@@ -1300,11 +1300,7 @@ macro(llvm_add_tool project name)
     set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS ${name})
   endif()
   set_target_properties(${name} PROPERTIES FOLDER "Tools")
-endmacro(llvm_add_tool project name)
-
-macro(add_llvm_tool name)
-  llvm_add_tool(LLVM ${ARGV})
-endmacro()
+endmacro(add_llvm_tool name)
 
 
 macro(add_llvm_example name)
@@ -2003,7 +1999,7 @@ function(llvm_install_library_symlink name dest type)
 
 endfunction()
 
-function(llvm_install_symlink project name dest)
+function(llvm_install_symlink name dest)
   cmake_parse_arguments(ARG "ALWAYS_GENERATE" "COMPONENT" "" ${ARGN})
   foreach(path ${CMAKE_MODULE_PATH})
     if(EXISTS ${path}/LLVMInstallSymlink.cmake)
@@ -2026,7 +2022,7 @@ function(llvm_install_symlink project name dest)
   set(full_dest ${dest}${CMAKE_EXECUTABLE_SUFFIX})
 
   install(SCRIPT ${INSTALL_SYMLINK}
-          CODE "install_symlink(${full_name} ${full_dest} ${${project}_TOOLS_INSTALL_DIR})"
+          CODE "install_symlink(${full_name} ${full_dest} ${LLVM_TOOLS_INSTALL_DIR})"
           COMPONENT ${component})
 
   if (NOT LLVM_ENABLE_IDE AND NOT ARG_ALWAYS_GENERATE)
@@ -2037,7 +2033,7 @@ function(llvm_install_symlink project name dest)
   endif()
 endfunction()
 
-function(llvm_add_tool_symlink project link_name target)
+function(add_llvm_tool_symlink link_name target)
   cmake_parse_arguments(ARG "ALWAYS_GENERATE" "OUTPUT_DIR" "" ${ARGN})
 
   get_property(LLVM_DRIVER_TOOLS GLOBAL PROPERTY LLVM_DRIVER_TOOLS)
@@ -2119,15 +2115,11 @@ function(llvm_add_tool_symlink project link_name target)
     endif()
 
     if ((TOOL_IS_TOOLCHAIN OR NOT LLVM_INSTALL_TOOLCHAIN_ONLY) AND LLVM_BUILD_TOOLS)
-      llvm_install_symlink("${project}" ${link_name} ${target})
+      llvm_install_symlink(${link_name} ${target})
     endif()
   endif()
 endfunction()
 
-function(add_llvm_tool_symlink link_name target)
-  llvm_add_tool_symlink(LLVM ${ARGV})
-endfunction()
-
 function(llvm_externalize_debuginfo name)
   if(NOT LLVM_EXTERNALIZE_DEBUGINFO)
     return()

diff  --git a/llvm/cmake/modules/CMakeLists.txt b/llvm/cmake/modules/CMakeLists.txt
index 42bf5bc0feeba..c77d30c82de9a 100644
--- a/llvm/cmake/modules/CMakeLists.txt
+++ b/llvm/cmake/modules/CMakeLists.txt
@@ -131,6 +131,7 @@ list(REMOVE_DUPLICATES LLVM_CONFIG_LIBRARY_DIRS)
 
 set(LLVM_CONFIG_BINARY_DIR "\${LLVM_INSTALL_PREFIX}")
 extend_path(LLVM_CONFIG_CMAKE_DIR "\${LLVM_INSTALL_PREFIX}" "${LLVM_INSTALL_PACKAGE_DIR}")
+extend_path(LLVM_CONFIG_TOOLS_BINARY_DIR "\${LLVM_INSTALL_PREFIX}" "${LLVM_TOOLS_INSTALL_DIR}")
 
 # Generate a default location for lit
 if (LLVM_INSTALL_UTILS AND LLVM_BUILD_UTILS)

diff  --git a/llvm/cmake/modules/LLVMConfig.cmake.in b/llvm/cmake/modules/LLVMConfig.cmake.in
index 7932963877aae..d95fa919ef512 100644
--- a/llvm/cmake/modules/LLVMConfig.cmake.in
+++ b/llvm/cmake/modules/LLVMConfig.cmake.in
@@ -121,6 +121,7 @@ set(LLVM_DEFINITIONS "@LLVM_DEFINITIONS@")
 set(LLVM_BINARY_DIR "@LLVM_CONFIG_BINARY_DIR@")
 set(LLVM_CMAKE_DIR "@LLVM_CONFIG_CMAKE_DIR@")
 set(LLVM_TOOLS_BINARY_DIR "@LLVM_CONFIG_TOOLS_BINARY_DIR@")
+set(LLVM_TOOLS_INSTALL_DIR "@LLVM_TOOLS_INSTALL_DIR@")
 set(LLVM_HAVE_OPT_VIEWER_MODULES @LLVM_HAVE_OPT_VIEWER_MODULES@)
 set(LLVM_CONFIGURATION_TYPES @CMAKE_CONFIGURATION_TYPES@)
 set(LLVM_ENABLE_SHARED_LIBS @BUILD_SHARED_LIBS@)

diff  --git a/llvm/cmake/modules/TableGen.cmake b/llvm/cmake/modules/TableGen.cmake
index 4711456776c86..5e58cbf6a72c9 100644
--- a/llvm/cmake/modules/TableGen.cmake
+++ b/llvm/cmake/modules/TableGen.cmake
@@ -196,7 +196,7 @@ macro(add_tablegen target project)
     install(TARGETS ${target}
             ${export_to_llvmexports}
             COMPONENT ${target}
-            RUNTIME DESTINATION "${${project}_TOOLS_INSTALL_DIR}")
+            RUNTIME DESTINATION ${LLVM_TOOLS_INSTALL_DIR})
     if(NOT LLVM_ENABLE_IDE)
       add_llvm_install_targets("install-${target}"
                                DEPENDS ${target}

diff  --git a/mlir/CMakeLists.txt b/mlir/CMakeLists.txt
index 3ea0be3e6b05c..35d68bdfc0abe 100644
--- a/mlir/CMakeLists.txt
+++ b/mlir/CMakeLists.txt
@@ -32,10 +32,6 @@ if(MLIR_STANDALONE_BUILD)
   set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/bin")
 endif()
 
-set(MLIR_TOOLS_INSTALL_DIR "${CMAKE_INSTALL_BINDIR}" CACHE PATH
-    "Path for binary subdirectory (defaults to '${CMAKE_INSTALL_BINDIR}')")
-mark_as_advanced(MLIR_TOOLS_INSTALL_DIR)
-
 set(MLIR_MAIN_SRC_DIR     ${CMAKE_CURRENT_SOURCE_DIR}  )
 set(MLIR_MAIN_INCLUDE_DIR ${MLIR_MAIN_SRC_DIR}/include )
 

diff  --git a/mlir/cmake/modules/AddMLIR.cmake b/mlir/cmake/modules/AddMLIR.cmake
index 0e06e93cb8f3a..c6eebfaac40ce 100644
--- a/mlir/cmake/modules/AddMLIR.cmake
+++ b/mlir/cmake/modules/AddMLIR.cmake
@@ -258,10 +258,6 @@ function(add_mlir_library name)
   endif()
 endfunction(add_mlir_library)
 
-macro(add_mlir_tool name)
-  llvm_add_tool(MLIR ${ARGV})
-endmacro()
-
 # Sets a variable with a transformed list of link libraries such individual
 # libraries will be dynamically excluded when evaluated on a final library
 # which defines an MLIR_AGGREGATE_EXCLUDE_LIBS which contains any of the

diff  --git a/mlir/tools/mlir-cpu-runner/CMakeLists.txt b/mlir/tools/mlir-cpu-runner/CMakeLists.txt
index d0d37eabfa88c..8ca83a289150d 100644
--- a/mlir/tools/mlir-cpu-runner/CMakeLists.txt
+++ b/mlir/tools/mlir-cpu-runner/CMakeLists.txt
@@ -5,7 +5,7 @@ set(LLVM_LINK_COMPONENTS
   native
   )
 
-add_mlir_tool(mlir-cpu-runner
+add_llvm_tool(mlir-cpu-runner
   mlir-cpu-runner.cpp
   )
 llvm_update_compile_flags(mlir-cpu-runner)

diff  --git a/mlir/tools/mlir-linalg-ods-gen/CMakeLists.txt b/mlir/tools/mlir-linalg-ods-gen/CMakeLists.txt
index 88ab69f476234..15e745f612b11 100644
--- a/mlir/tools/mlir-linalg-ods-gen/CMakeLists.txt
+++ b/mlir/tools/mlir-linalg-ods-gen/CMakeLists.txt
@@ -4,7 +4,7 @@ set(LLVM_LINK_COMPONENTS
   )
 
 # New mlir-linalg-ods-yaml-gen.
-add_mlir_tool(mlir-linalg-ods-yaml-gen
+add_llvm_tool(mlir-linalg-ods-yaml-gen
   mlir-linalg-ods-yaml-gen.cpp
 )
 llvm_update_compile_flags(mlir-linalg-ods-yaml-gen)

diff  --git a/mlir/tools/mlir-lsp-server/CMakeLists.txt b/mlir/tools/mlir-lsp-server/CMakeLists.txt
index d1c1ea99bc000..14aa124676158 100644
--- a/mlir/tools/mlir-lsp-server/CMakeLists.txt
+++ b/mlir/tools/mlir-lsp-server/CMakeLists.txt
@@ -42,7 +42,7 @@ set(LIBS
   MLIRIR
   )
 
-add_mlir_tool(mlir-lsp-server
+add_llvm_tool(mlir-lsp-server
   mlir-lsp-server.cpp
 
   DEPENDS

diff  --git a/mlir/tools/mlir-opt/CMakeLists.txt b/mlir/tools/mlir-opt/CMakeLists.txt
index 1eea52cb5f4b0..a8172b83f1a47 100644
--- a/mlir/tools/mlir-opt/CMakeLists.txt
+++ b/mlir/tools/mlir-opt/CMakeLists.txt
@@ -64,7 +64,7 @@ add_mlir_library(MLIRMlirOptMain
   ${LIBS}
   )
 
-add_mlir_tool(mlir-opt
+add_llvm_tool(mlir-opt
   mlir-opt.cpp
 
   DEPENDS

diff  --git a/mlir/tools/mlir-pdll-lsp-server/CMakeLists.txt b/mlir/tools/mlir-pdll-lsp-server/CMakeLists.txt
index 4dfcd13a65857..901c0a40fcf83 100644
--- a/mlir/tools/mlir-pdll-lsp-server/CMakeLists.txt
+++ b/mlir/tools/mlir-pdll-lsp-server/CMakeLists.txt
@@ -2,7 +2,7 @@ set(LIBS
   MLIRPdllLspServerLib
   )
 
-add_mlir_tool(mlir-pdll-lsp-server
+add_llvm_tool(mlir-pdll-lsp-server
   mlir-pdll-lsp-server.cpp
 
   DEPENDS

diff  --git a/mlir/tools/mlir-reduce/CMakeLists.txt b/mlir/tools/mlir-reduce/CMakeLists.txt
index 8549dbf805f54..8893316f53b8c 100644
--- a/mlir/tools/mlir-reduce/CMakeLists.txt
+++ b/mlir/tools/mlir-reduce/CMakeLists.txt
@@ -17,7 +17,7 @@ set(LIBS
   MLIRReduceLib
   )
 
-add_mlir_tool(mlir-reduce
+add_llvm_tool(mlir-reduce
   mlir-reduce.cpp
 
   DEPENDS

diff  --git a/mlir/tools/mlir-spirv-cpu-runner/CMakeLists.txt b/mlir/tools/mlir-spirv-cpu-runner/CMakeLists.txt
index 14b31f2e4edeb..7029de6edc4b4 100644
--- a/mlir/tools/mlir-spirv-cpu-runner/CMakeLists.txt
+++ b/mlir/tools/mlir-spirv-cpu-runner/CMakeLists.txt
@@ -5,7 +5,7 @@ set(LLVM_LINK_COMPONENTS
 if (MLIR_ENABLE_SPIRV_CPU_RUNNER)
   message(STATUS "Building SPIR-V CPU runner")
 
-  add_mlir_tool(mlir-spirv-cpu-runner
+  add_llvm_tool(mlir-spirv-cpu-runner
     mlir-spirv-cpu-runner.cpp
   )
 

diff  --git a/mlir/tools/mlir-translate/CMakeLists.txt b/mlir/tools/mlir-translate/CMakeLists.txt
index b6a5c60900dd5..b1145f265c499 100644
--- a/mlir/tools/mlir-translate/CMakeLists.txt
+++ b/mlir/tools/mlir-translate/CMakeLists.txt
@@ -5,7 +5,7 @@ set(LLVM_LINK_COMPONENTS
 get_property(dialect_libs GLOBAL PROPERTY MLIR_DIALECT_LIBS)
 get_property(translation_libs GLOBAL PROPERTY MLIR_TRANSLATION_LIBS)
 
-add_mlir_tool(mlir-translate
+add_llvm_tool(mlir-translate
   mlir-translate.cpp
   )
 llvm_update_compile_flags(mlir-translate)

diff  --git a/mlir/tools/mlir-vulkan-runner/CMakeLists.txt b/mlir/tools/mlir-vulkan-runner/CMakeLists.txt
index 9232c09365fd3..7d331e76ba788 100644
--- a/mlir/tools/mlir-vulkan-runner/CMakeLists.txt
+++ b/mlir/tools/mlir-vulkan-runner/CMakeLists.txt
@@ -88,7 +88,7 @@ if (MLIR_ENABLE_VULKAN_RUNNER)
     LIST(APPEND targets_to_link "LLVM${t}")
   ENDFOREACH(t)
 
-  add_mlir_tool(mlir-vulkan-runner
+  add_llvm_tool(mlir-vulkan-runner
     mlir-vulkan-runner.cpp
 
     DEPENDS

diff  --git a/mlir/tools/tblgen-lsp-server/CMakeLists.txt b/mlir/tools/tblgen-lsp-server/CMakeLists.txt
index a96fa41180e09..35754573a0426 100644
--- a/mlir/tools/tblgen-lsp-server/CMakeLists.txt
+++ b/mlir/tools/tblgen-lsp-server/CMakeLists.txt
@@ -2,7 +2,7 @@ set(LIBS
   TableGenLspServerLib
   )
 
-add_mlir_tool(tblgen-lsp-server
+add_llvm_tool(tblgen-lsp-server
   tblgen-lsp-server.cpp
 
   DEPENDS

diff  --git a/openmp/libomptarget/tools/CMakeLists.txt b/openmp/libomptarget/tools/CMakeLists.txt
index 9237035c46580..ca5e785ab4cc9 100644
--- a/openmp/libomptarget/tools/CMakeLists.txt
+++ b/openmp/libomptarget/tools/CMakeLists.txt
@@ -10,18 +10,4 @@
 #
 ##===----------------------------------------------------------------------===##
 
-set(OPENMP_TOOLS_INSTALL_DIR "${CMAKE_INSTALL_BINDIR}" CACHE PATH
-    "Path for binary subdirectory (defaults to '${CMAKE_INSTALL_BINDIR}')")
-mark_as_advanced(OPENMP_TOOLS_INSTALL_DIR)
-
-# Move these macros to AddOpenMP if such a CMake module is ever created.
-
-macro(add_openmp_tool name)
-  llvm_add_tool(OPENMP ${ARGV})
-endmacro()
-
-macro(add_openmp_tool_symlink name)
-  llvm_add_tool_symlink(OPENMP ${ARGV})
-endmacro()
-
 add_subdirectory(deviceinfo)

diff  --git a/openmp/libomptarget/tools/deviceinfo/CMakeLists.txt b/openmp/libomptarget/tools/deviceinfo/CMakeLists.txt
index 62d36d7cc92f0..290fc8346923c 100644
--- a/openmp/libomptarget/tools/deviceinfo/CMakeLists.txt
+++ b/openmp/libomptarget/tools/deviceinfo/CMakeLists.txt
@@ -12,7 +12,7 @@
 
 libomptarget_say("Building the llvm-omp-device-info tool")
 
-add_openmp_tool(llvm-omp-device-info llvm-omp-device-info.cpp)
+add_llvm_tool(llvm-omp-device-info llvm-omp-device-info.cpp)
 
 llvm_update_compile_flags(llvm-omp-device-info)
 


        


More information about the cfe-commits mailing list