Skip to content

Commit 5424cee

Browse files
author
Jose M Monsalve Diaz
committed
[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
1 parent c112483 commit 5424cee

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed

llvm/runtimes/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,7 @@ function(runtime_default_target)
232232
-DLLVM_DEFAULT_TARGET_TRIPLE=${TARGET_TRIPLE}
233233
-DLLVM_ENABLE_PROJECTS_USED=${LLVM_ENABLE_PROJECTS_USED}
234234
-DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=${LLVM_ENABLE_PER_TARGET_RUNTIME_DIR_default}
235+
-DLLVM_BUILD_TOOLS=${LLVM_BUILD_TOOLS}
235236
-DCMAKE_C_COMPILER_WORKS=ON
236237
-DCMAKE_CXX_COMPILER_WORKS=ON
237238
-DCMAKE_ASM_COMPILER_WORKS=ON

openmp/libomptarget/tools/deviceinfo/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
##===----------------------------------------------------------------------===##
1212

1313
libomptarget_say("Building the llvm-omp-device-info tool")
14-
libomptarget_say("llvm-omp-device-info using plugins ${LIBOMPTARGET_TESTED_PLUGINS}")
1514

1615
add_llvm_tool(llvm-omp-device-info llvm-omp-device-info.cpp)
1716

0 commit comments

Comments
 (0)