Skip to content

Commit

Permalink
[OpenMP] Fixing llvm-omp-device-info compilation with runtimes
Browse files Browse the repository at this point in the history
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

(cherry picked from commit 5424cee)
  • Loading branch information
Jose M Monsalve Diaz authored and tstellar committed Aug 3, 2021
1 parent ec7ef42 commit 60c388a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 1 addition & 0 deletions llvm/runtimes/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion openmp/libomptarget/tools/deviceinfo/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 60c388a

Please sign in to comment.