aboutsummaryrefslogtreecommitdiff
path: root/llvm/runtimes
diff options
context:
space:
mode:
authorJoachim Protze <protze@itc.rwth-aachen.de>2021-08-19 23:28:51 +0200
committerJoachim Protze <protze@itc.rwth-aachen.de>2021-08-20 01:57:58 +0200
commit4bb36df144127c5bee6ea2607bc544c003aae446 (patch)
tree47e288cd5dd2530e0227a2c32da8fb888d808655 /llvm/runtimes
parent77b435aaa19cb5ff897a67fb9878115196e1524a (diff)
downloadllvm-4bb36df144127c5bee6ea2607bc544c003aae446.zip
llvm-4bb36df144127c5bee6ea2607bc544c003aae446.tar.gz
llvm-4bb36df144127c5bee6ea2607bc544c003aae446.tar.bz2
[libomptarget][amdcgn] Add build dependency for llvm-link and opt
D107156 and D107320 are not sufficient when OpenMP is built as llvm runtime (LLVM_ENABLE_RUNTIMES=openmp) because dependencies only work within the same cmake instance. We could limit the dependency to cases where libomptarget/plugins are really built. But compared to the whole llvm project, building openmp runtime is negligible and postponing the build of OpenMP runtime after the dependencies are ready seems reasonable. The direct dependency introduced in D107156 and D107320 is necessary for the case where OpenMP is built as llvm project (LLVM_ENABLE_PROJECTS=openmp). Differential Revision: https://reviews.llvm.org/D108404
Diffstat (limited to 'llvm/runtimes')
-rw-r--r--llvm/runtimes/CMakeLists.txt8
1 files changed, 6 insertions, 2 deletions
diff --git a/llvm/runtimes/CMakeLists.txt b/llvm/runtimes/CMakeLists.txt
index 2786aa4..b972933 100644
--- a/llvm/runtimes/CMakeLists.txt
+++ b/llvm/runtimes/CMakeLists.txt
@@ -350,15 +350,19 @@ if(runtimes)
# Create a runtimes target that uses this file as its top-level CMake file.
# The runtimes target is a configuration of all the runtime libraries
# together in a single CMake invocaiton.
+ if("openmp" IN_LIST LLVM_ENABLE_RUNTIMES)
+ message(STATUS "Adding dependencies opt llvm-link")
+ set(extra_deps opt llvm-link)
+ endif()
if(NOT LLVM_RUNTIME_TARGETS)
runtime_default_target(
- DEPENDS ${deps}
+ DEPENDS ${deps} ${extra_deps}
PREFIXES ${prefixes})
set(test_targets check-runtimes)
else()
if("default" IN_LIST LLVM_RUNTIME_TARGETS)
runtime_default_target(
- DEPENDS ${deps}
+ DEPENDS ${deps} ${extra_deps}
PREFIXES ${prefixes})
list(REMOVE_ITEM LLVM_RUNTIME_TARGETS "default")
else()