[libomptarget][amdgpu] use --allow-shlib-undefined to link on FreeBSD
authorDimitry Andric <dimitry@andric.com>
Sat, 7 Aug 2021 19:39:11 +0000 (21:39 +0200)
committerDimitry Andric <dimitry@andric.com>
Sun, 8 Aug 2021 11:52:44 +0000 (13:52 +0200)
commit400cd6d2f0496e913e25285615a86f9c29811171
tree39866796b2d2f543d5d86aa844c37d2737a0e1a4
parentab4b4684a26c31b1eb507a7eb6d2f4ac30764c3d
[libomptarget][amdgpu] use --allow-shlib-undefined to link on FreeBSD

On FreeBSD, the `environ` symbol is undefined at link time for shared
libraries, but resolved by the dynamic linker at runtime. Therefore,
allow the symbol to be undefined when creating a shared library, by
using the `--allow-shlib-undefined` linker flag, instead of `-z defs`
(a.k.a `--no-undefined`).

Reviewed By: JonChesterfield

Differential Revision: https://reviews.llvm.org/D107698
openmp/libomptarget/plugins/amdgpu/CMakeLists.txt