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

Shilei Tian via All-commits all-commits at lists.llvm.org
Mon May 1 16:01:57 PDT 2023

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

  Changed paths:
    M openmp/libomptarget/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