The title is self-descriptive. There are some details here: https://reviews.llvm.org/D93727#2524458
I was going to assert that the threads support library is found in openmp/libomptarget/cmake/Modules/LibomptargetGetDependencies.cmake, but I guess there may be plugins that do not use Debug.h, so I left it undefined what happens, if the library is not found.