[openmp] [elf_common] Fix linking against LLVM dylib
authorMichał Górny <mgorny@moritz.systems>
Mon, 4 Oct 2021 06:25:45 +0000 (08:25 +0200)
committerMichał Górny <mgorny@moritz.systems>
Mon, 4 Oct 2021 07:29:06 +0000 (09:29 +0200)
commit0873b9bef4e03b4cfc44a4946c11103c763055df
treeed9bd0f16304dc8ad3d035061b72fe1e83f446d8
parent71ad0f9d4e5b63ccee1ee4146525940849d2c962
[openmp] [elf_common] Fix linking against LLVM dylib

The hand-rolled linking logic in elf_common does not account for
the possibility of using LLVM dylib rather than a dozen static
libraries.  Since it does not seem to be easily convertible
to add_llvm_library, just hand-roll support for LLVM_LINK_LLVM_DYLIB.
This is necessary to support stand-alone builds against installed LLVM.

Differential Revision: https://reviews.llvm.org/D111038
openmp/libomptarget/plugins/common/elf_common/CMakeLists.txt