[libomptarget][amdcgn] Add build dependency for llvm-link and opt
authorJoachim Protze <protze@itc.rwth-aachen.de>
Thu, 19 Aug 2021 21:28:51 +0000 (23:28 +0200)
committerJoachim Protze <protze@itc.rwth-aachen.de>
Thu, 19 Aug 2021 23:57:58 +0000 (01:57 +0200)
commit4bb36df144127c5bee6ea2607bc544c003aae446
tree47e288cd5dd2530e0227a2c32da8fb888d808655
parent77b435aaa19cb5ff897a67fb9878115196e1524a
[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
llvm/runtimes/CMakeLists.txt
openmp/libomptarget/DeviceRTL/CMakeLists.txt
openmp/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt