[all-commits] [llvm/llvm-project] e87e4c: [OpenMP] Make `libomptarget` link against `libomp`

Shilei Tian via All-commits all-commits at lists.llvm.org
Sat May 6 20:27:05 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e87e4cfc12884479ff402e0689f374f155a41abf
      https://github.com/llvm/llvm-project/commit/e87e4cfc12884479ff402e0689f374f155a41abf
  Author: Shilei Tian <i at tianshilei.me>
  Date:   2023-05-06 (Sat, 06 May 2023)

  Changed paths:
    M openmp/libomptarget/src/CMakeLists.txt
    M openmp/runtime/src/CMakeLists.txt

  Log Message:
  -----------
  [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




More information about the All-commits mailing list