[Openmp-commits] [PATCH] D104545: [NFC][libomptarget] Build elf_common with PIC.

Vyacheslav Zakharin via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Fri Jun 18 09:21:35 PDT 2021


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG836992ab9a42: [NFC][libomptarget] Build elf_common with PIC. (authored by vzakhari).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D104545/new/

https://reviews.llvm.org/D104545

Files:
  openmp/libomptarget/plugins/common/elf_common/CMakeLists.txt


Index: openmp/libomptarget/plugins/common/elf_common/CMakeLists.txt
===================================================================
--- openmp/libomptarget/plugins/common/elf_common/CMakeLists.txt
+++ openmp/libomptarget/plugins/common/elf_common/CMakeLists.txt
@@ -12,6 +12,8 @@
 
 add_library(elf_common OBJECT elf_common.cpp)
 
+# Build elf_common with PIC to be able to link it with plugin shared libraries.
+set_property(TARGET elf_common PROPERTY POSITION_INDEPENDENT_CODE ON)
 llvm_update_compile_flags(elf_common)
 set(LINK_LLVM_LIBS LLVMBinaryFormat LLVMObject LLVMSupport)
 target_link_libraries(elf_common INTERFACE ${LINK_LLVM_LIBS} ${LIBOMPTARGET_DEP_LIBELF_LIBRARIES})


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D104545.353028.patch
Type: text/x-patch
Size: 687 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20210618/b72cc3f5/attachment-0001.bin>


More information about the Openmp-commits mailing list