[libomptarget][amdgcn] Tolerate deadstripped env variable
authorJon Chesterfield <jonathanchesterfield@gmail.com>
Tue, 9 Feb 2021 11:58:37 +0000 (11:58 +0000)
committerJon Chesterfield <jonathanchesterfield@gmail.com>
Tue, 9 Feb 2021 11:58:37 +0000 (11:58 +0000)
commit4756f76bce7835dd233c82637bf60082469f9320
treee3f1fac21285943278f6fcc5d1196d615505e209
parent2ccb941740e608a9cf70a7c5840497149654b0f6
[libomptarget][amdgcn] Tolerate deadstripped env variable

[libomptarget][amdgcn] Tolerate deadstripped env variable

Discovered by Pushpinder. If the device_environment variable is unused
it can be deadstripped, in which case we should not abort due to it
missing. This change is safe in that a missing symbol which is actually
used can be reported by both linker and loader, and a missing unused
symbol is better deadstripped than left in the image.

Reviewed By: pdhaliwal

Differential Revision: https://reviews.llvm.org/D96329
openmp/libomptarget/plugins/amdgpu/src/rtl.cpp