diff options
author | Shilei Tian <i@tianshilei.me> | 2023-05-01 19:01:33 -0400 |
---|---|---|
committer | Shilei Tian <i@tianshilei.me> | 2023-05-01 19:01:45 -0400 |
commit | dc049a4ea681b1d0a4880bae3e19ae0ef40f6e80 (patch) | |
tree | 8d2ed534802ffb68b77f29e6dcb2b42338f5ed27 /openmp | |
parent | 1e853421a4b44e05ef9c63e24f183d6fe65e424e (diff) | |
download | llvm-dc049a4ea681b1d0a4880bae3e19ae0ef40f6e80.tar.gz |
[OpenMP] Make `libomptarget` link against `libomp`
In `libomptarget` we use a couple of functions from `libomp`, but we didn't link
`libomptarget` 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`.
Reviewed By: jdoerfert
Differential Revision: https://reviews.llvm.org/D149617
Diffstat (limited to 'openmp')
-rw-r--r-- | openmp/libomptarget/src/CMakeLists.txt | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/openmp/libomptarget/src/CMakeLists.txt b/openmp/libomptarget/src/CMakeLists.txt index ef3a6270b78a..ff5d8c4dd558 100644 --- a/openmp/libomptarget/src/CMakeLists.txt +++ b/openmp/libomptarget/src/CMakeLists.txt @@ -31,6 +31,10 @@ add_llvm_library(omptarget Support Object + LINK_LIBS + PUBLIC + omp + NO_INSTALL_RPATH ) target_include_directories(omptarget PRIVATE ${LIBOMPTARGET_INCLUDE_DIR}) |