[Openmp-commits] [openmp] 5424cee - [OpenMP] Fixing llvm-omp-device-info compilation with runtimes
Jose M Monsalve Diaz via Openmp-commits
openmp-commits at lists.llvm.org
Fri Jul 30 11:09:19 PDT 2021
Author: Jose M Monsalve Diaz
Date: 2021-07-30T13:09:08-05:00
New Revision: 5424ceeda0534ab382e2a6cb192099f76ee8b12c
URL: https://github.com/llvm/llvm-project/commit/5424ceeda0534ab382e2a6cb192099f76ee8b12c
DIFF: https://github.com/llvm/llvm-project/commit/5424ceeda0534ab382e2a6cb192099f76ee8b12c.diff
LOG: [OpenMP] Fixing llvm-omp-device-info compilation with runtimes
When using `-DLLVM_ENABLED_RUNTIMES` instead of `-DLLVM_ENABLED_PROJECTS`
the `llvm-omp-device-info` tool is not compiled or installed.
In general, no llvm tool would be build on runtimes, because the
-DLLVM_BUILD_TOOLS flag is removed by the way runtimes compilation calls
cmake again.
This patch is simple. Just forward the value of this flag to the
runtime cmake command.
I'm also removing an unnecessary comment in the compilation of the tool
Differential Revision: https://reviews.llvm.org/D107177
Added:
Modified:
llvm/runtimes/CMakeLists.txt
openmp/libomptarget/tools/deviceinfo/CMakeLists.txt
Removed:
################################################################################
diff --git a/llvm/runtimes/CMakeLists.txt b/llvm/runtimes/CMakeLists.txt
index 6ae087ef62dda..2786aa45e06f2 100644
--- a/llvm/runtimes/CMakeLists.txt
+++ b/llvm/runtimes/CMakeLists.txt
@@ -232,6 +232,7 @@ function(runtime_default_target)
-DLLVM_DEFAULT_TARGET_TRIPLE=${TARGET_TRIPLE}
-DLLVM_ENABLE_PROJECTS_USED=${LLVM_ENABLE_PROJECTS_USED}
-DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=${LLVM_ENABLE_PER_TARGET_RUNTIME_DIR_default}
+ -DLLVM_BUILD_TOOLS=${LLVM_BUILD_TOOLS}
-DCMAKE_C_COMPILER_WORKS=ON
-DCMAKE_CXX_COMPILER_WORKS=ON
-DCMAKE_ASM_COMPILER_WORKS=ON
diff --git a/openmp/libomptarget/tools/deviceinfo/CMakeLists.txt b/openmp/libomptarget/tools/deviceinfo/CMakeLists.txt
index dab61cf6b4acd..4073ad9fe4293 100644
--- a/openmp/libomptarget/tools/deviceinfo/CMakeLists.txt
+++ b/openmp/libomptarget/tools/deviceinfo/CMakeLists.txt
@@ -11,7 +11,6 @@
##===----------------------------------------------------------------------===##
libomptarget_say("Building the llvm-omp-device-info tool")
-libomptarget_say("llvm-omp-device-info using plugins ${LIBOMPTARGET_TESTED_PLUGINS}")
add_llvm_tool(llvm-omp-device-info llvm-omp-device-info.cpp)
More information about the Openmp-commits
mailing list