[Libomptarget] Build the device library even if the sm list is empty
authorJoseph Huber <jhuber6@vols.utk.edu>
Thu, 21 Jul 2022 13:34:58 +0000 (09:34 -0400)
committerJoseph Huber <jhuber6@vols.utk.edu>
Thu, 21 Jul 2022 14:57:47 +0000 (10:57 -0400)
commit5d8a76feb02ff3db5e25b9c5a8edff49e750f7fb
treeb801b8c47c78b21ac5a1475419ba49cc730b8af0
parentf621e568f333196bcea9778f1ec086ced38fdd12
[Libomptarget] Build the device library even if the sm list is empty

We previously had some logic that stopped us from building the device runtime if
there were no NVPTX architectures provided. This is incorrect because we could
have AMDGPU libraries. Even if the lists are empty we should be able to attempt
to build these and get dummy output. THis wilil make it much easier for our
tooling which expects certain libraries. If the user wishes to disable the
library entirely they should use `-DLIBOMPTARGET_BUILD_DEVICERTL_BCLIB=OFF"

Reviewed By: tianshilei1992

Differential Revision: https://reviews.llvm.org/D130266
openmp/libomptarget/DeviceRTL/CMakeLists.txt