From 83fcba82cc7e97725de8442631e3eb5bfef8880d Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Fri, 9 Sep 2022 10:31:03 -0500 Subject: [PATCH] [Libomptarget] Add proper LLVM libraries now that the AMDGPU plugin uses them Summary: The AMDGPU and CUDA plugins now relies on the Object and Support libraries. This patch adds them explicitly rather than hoping that they share the symbols loaded from the standard `libomptarget`. --- openmp/libomptarget/plugins/amdgpu/CMakeLists.txt | 4 ++++ openmp/libomptarget/plugins/cuda/CMakeLists.txt | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/openmp/libomptarget/plugins/amdgpu/CMakeLists.txt b/openmp/libomptarget/plugins/amdgpu/CMakeLists.txt index 3e70dea..dfd3671 100644 --- a/openmp/libomptarget/plugins/amdgpu/CMakeLists.txt +++ b/openmp/libomptarget/plugins/amdgpu/CMakeLists.txt @@ -75,6 +75,10 @@ add_llvm_library(omptarget.rtl.amdgpu SHARED ${LIBOMPTARGET_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/impl + LINK_COMPONENTS + Support + Object + LINK_LIBS PRIVATE elf_common diff --git a/openmp/libomptarget/plugins/cuda/CMakeLists.txt b/openmp/libomptarget/plugins/cuda/CMakeLists.txt index 505c093..244060e 100644 --- a/openmp/libomptarget/plugins/cuda/CMakeLists.txt +++ b/openmp/libomptarget/plugins/cuda/CMakeLists.txt @@ -44,6 +44,10 @@ if (LIBOMPTARGET_CAN_LINK_LIBCUDA AND NOT LIBOMPTARGET_FORCE_DLOPEN_LIBCUDA) ADDITIONAL_HEADER_DIRS ${LIBOMPTARGET_INCLUDE_DIR} + LINK_COMPONENTS + Support + Object + LINK_LIBS PRIVATE elf_common -- 2.7.4