Skip to content

Commit

Permalink
[NFC][libomptarget] Build elf_common with PIC.
Browse files Browse the repository at this point in the history
Differential Revision: https://reviews.llvm.org/D104545
  • Loading branch information
Vyacheslav Zakharin committed Jun 18, 2021
1 parent c5b7c7c commit 836992a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions openmp/libomptarget/plugins/common/elf_common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down

0 comments on commit 836992a

Please sign in to comment.