[llvm] [offload] - Fix issue with standalone debug offload build (PR #104647)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 16 16:03:51 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-offload
Author: None (estewart08)
<details>
<summary>Changes</summary>
Error: CommandLine Error: Option 'attributor-manifest-internal' registered more than once
During the standalone debug build of offload the above error is seen at app runtime when using a prebuilt llvm with LLVM_LINK_LLVM_DYLIB=ON. This is caused by linking both libLLVM.so and various archives that are found via llvm_map_components_to_libnames for jit support.
---
Full diff: https://github.com/llvm/llvm-project/pull/104647.diff
1 Files Affected:
- (modified) offload/plugins-nextgen/common/CMakeLists.txt (+6-2)
``````````diff
diff --git a/offload/plugins-nextgen/common/CMakeLists.txt b/offload/plugins-nextgen/common/CMakeLists.txt
index 284f98875170cd..fb3bf9591b1429 100644
--- a/offload/plugins-nextgen/common/CMakeLists.txt
+++ b/offload/plugins-nextgen/common/CMakeLists.txt
@@ -13,8 +13,12 @@ add_dependencies(PluginCommon intrinsics_gen)
set(supported_jit_targets AMDGPU NVPTX)
foreach(target IN LISTS supported_jit_targets)
if("${target}" IN_LIST LLVM_TARGETS_TO_BUILD)
- target_compile_definitions(PluginCommon PRIVATE "LIBOMPTARGET_JIT_${target}")
- llvm_map_components_to_libnames(llvm_libs ${target})
+ target_compile_definitions(PluginCommon PRIVATE "LIBOMPTARGET_JIT_${target}")
+ if (LLVM_LINK_LLVM_DYLIB)
+ set(llvm_libs LLVM)
+ else()
+ llvm_map_components_to_libnames(llvm_libs ${target})
+ endif()
target_link_libraries(PluginCommon PRIVATE ${llvm_libs})
endif()
endforeach()
``````````
</details>
https://github.com/llvm/llvm-project/pull/104647
More information about the llvm-commits
mailing list