OSDN Git Service

[OpenMP] Take elf_common.c as a interface library
authorShilei Tian <tianshilei1992@gmail.com>
Mon, 11 Jan 2021 22:34:17 +0000 (17:34 -0500)
committerShilei Tian <tianshilei1992@gmail.com>
Mon, 11 Jan 2021 22:34:26 +0000 (17:34 -0500)
commita81c68ae6be58efa24e2573e155d5ef20260399b
tree2c0d4d70c943cdc842277138db32f0ab72df6110
parent32bcfcda4e28375e5a85268d2acfabcfcc011abf
[OpenMP] Take elf_common.c as a interface library

For now `elf_common.c` is taken as a common part included into
different plugin implementations directly via
`#include "../../common/elf_common.c"`, which is not a best practice. Since it
is simple enough such that we don't need to create a real library for it, we just
take it as a interface library so that other targets can link it directly. Another
advantage of this method is, we don't need to add the folder into header search
path which can potentially pollute the search path.

VE and AMD platforms have not been tested because I don't have target machines.

Reviewed By: JonChesterfield

Differential Revision: https://reviews.llvm.org/D94443
openmp/libomptarget/plugins/CMakeLists.txt
openmp/libomptarget/plugins/amdgpu/CMakeLists.txt
openmp/libomptarget/plugins/amdgpu/src/rtl.cpp
openmp/libomptarget/plugins/common/CMakeLists.txt [new file with mode: 0644]
openmp/libomptarget/plugins/common/elf_common/CMakeLists.txt [new file with mode: 0644]
openmp/libomptarget/plugins/common/elf_common/elf_common.h [moved from openmp/libomptarget/plugins/common/elf_common.c with 93% similarity]
openmp/libomptarget/plugins/cuda/CMakeLists.txt
openmp/libomptarget/plugins/cuda/src/rtl.cpp
openmp/libomptarget/plugins/generic-elf-64bit/src/rtl.cpp
openmp/libomptarget/plugins/ve/CMakeLists.txt
openmp/libomptarget/plugins/ve/src/rtl.cpp