This patch adds the necessary CMake configuration to build a static
library version of the device runtime, libomptarget.devicertl.a.
Various improvements in how we handle static libraries and generating
offloading code should allow us to treat the device library as a regular
project without needing to invoke the clang front-end directly. Here we
generate a job for each offloading architecture supported. Each
offloading architecture will be embedded into the static library and
used as-needed by the host.
This library will primarily be used to replace the bitcode library when
performing LTO. Currently, we need to manually pass in the bitcode
library which requires foreknowledge of the offloading architecture.
This approach lets us handle that in the linker wrapper instead.
Furthermore this should improve our interface to the device runtime. We
can now build it fully under a release build and have all the expected
entry points, as well as supporting debug builds.
The order here is critical because both openmp/libomptarget/include and openmp/libomptarget/DeviceRTL/include has Debug.h. However, I don't think that's a good practice to use order to guard that. IMO, we need to move the global include to where it is actually being used.