[Openmp-commits] [PATCH] D149617: [OpenMP] Make `libomptarget` link against `libomp`
Shilei Tian via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Mon May 1 14:56:33 PDT 2023
tianshilei1992 created this revision.
tianshilei1992 added reviewers: jdoerfert, RaviNarayanaswamy, AndreyChurbanov, tlwilmar, jlpeyton, natgla.
Herald added subscribers: sunshaoce, guansong, yaxunl.
Herald added a project: All.
tianshilei1992 requested review of this revision.
Herald added subscribers: openmp-commits, jplehr, sstefan1.
Herald added a project: OpenMP.
In `libomptarget` we use a couple of functions from `libomp`, but we didn't link
`libomptarget` link against `libomp`. That will not work on some platforms such
as macOS. A linker error will be encountered because those symbols are not resolved
at link time when building `libomptarget`. This patch simply makes `libomptarget`
link agains `libomp`, makes it a "user" of `libomp`. I think this will not break
the policies between `libomp` and `libomptarget`.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D149617
Files:
openmp/libomptarget/src/CMakeLists.txt
Index: openmp/libomptarget/src/CMakeLists.txt
===================================================================
--- openmp/libomptarget/src/CMakeLists.txt
+++ openmp/libomptarget/src/CMakeLists.txt
@@ -31,6 +31,10 @@
Support
Object
+ LINK_LIBS
+ PUBLIC
+ omp
+
NO_INSTALL_RPATH
)
target_include_directories(omptarget PRIVATE ${LIBOMPTARGET_INCLUDE_DIR})
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D149617.518572.patch
Type: text/x-patch
Size: 372 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20230501/6a1df008/attachment.bin>
More information about the Openmp-commits
mailing list