[OpenMP] Do not link the bitcode OpenMP runtime when targeting AMDGPU.
authorJoseph Huber <jhuber6@vols.utk.edu>
Tue, 24 Jan 2023 17:45:17 +0000 (11:45 -0600)
committerJoseph Huber <jhuber6@vols.utk.edu>
Tue, 24 Jan 2023 23:01:37 +0000 (17:01 -0600)
commit5d1dc9fa043f8ee239cbc16347025a4f0831e132
tree248510b8c6846f61cd75a56769130cd050063fe8
parentdc60f7aa0435a4e4778cfbf22f4fcb52c97427c0
[OpenMP] Do not link the bitcode OpenMP runtime when targeting AMDGPU.

The AMDGPU target can only emit LLVM-IR, so we can always rely on LTO to
link the static version of the runtime optimally. Using the static
library only has a few advantages. Namely, it avoids several known bugs
and allows us to optimize out more functions. This is legal since the
changes in D142486 and D142484

Depends on D142486 D142484

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D142491
clang/lib/Driver/ToolChains/AMDGPUOpenMP.cpp
clang/test/Driver/amdgpu-openmp-toolchain.c
openmp/libomptarget/test/lit.cfg