[Openmp-commits] [llvm] [openmp] [offload] Standalone build fixes (PR #118173)
Joseph Huber via Openmp-commits
openmp-commits at lists.llvm.org
Sat Nov 30 07:04:11 PST 2024
=?utf-8?q?Michał_Górny?= <mgorny at gentoo.org>,
=?utf-8?q?Michał_Górny?= <mgorny at gentoo.org>,
=?utf-8?q?Michał_Górny?= <mgorny at gentoo.org>,
=?utf-8?q?Michał_Górny?= <mgorny at gentoo.org>,
=?utf-8?q?Michał_Górny?= <mgorny at gentoo.org>,
=?utf-8?q?Michał_Górny?= <mgorny at gentoo.org>,
=?utf-8?q?Michał_Górny?= <mgorny at gentoo.org>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/118173 at github.com>
================
@@ -8,14 +8,19 @@ target_sources(omptarget.rtl.amdgpu PRIVATE src/rtl.cpp)
target_include_directories(omptarget.rtl.amdgpu PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/utils)
+set(USE_SHARED)
+if (LLVM_LINK_LLVM_DYLIB)
+ set(USE_SHARED USE_SHARED)
+endif()
+llvm_config(omptarget.rtl.amdgpu ${USE_SHARED} FrontendOffloading)
+
if(hsa-runtime64_FOUND AND NOT "amdgpu" IN_LIST LIBOMPTARGET_DLOPEN_PLUGINS)
message(STATUS "Building AMDGPU plugin linked against libhsa")
- target_link_libraries(omptarget.rtl.amdgpu PRIVATE hsa-runtime64::hsa-runtime64 LLVMFrontendOffloading)
+ target_link_libraries(omptarget.rtl.amdgpu PRIVATE hsa-runtime64::hsa-runtime64)
else()
message(STATUS "Building AMDGPU plugin for dlopened libhsa")
target_include_directories(omptarget.rtl.amdgpu PRIVATE dynamic_hsa)
target_sources(omptarget.rtl.amdgpu PRIVATE dynamic_hsa/hsa.cpp)
- target_link_libraries(omptarget.rtl.amdgpu PRIVATE LLVMFrontendOffloading)
----------------
jhuber6 wrote:
I feel like the LLVM library here should be moved to the common plugin.
https://github.com/llvm/llvm-project/pull/118173
More information about the Openmp-commits
mailing list