[clang] [HIP] Define `_OPENMP` on the device for mixed OpenMP CPU compilations (PR #176791)

Shilei Tian via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 19 17:49:21 PST 2026


shiltian wrote:

I don't think this should be fixed by us. The CMake test code was not written correctly. It is based on some assumptions that might not be true. Does OpenMP require that a compliant compiler needs to always define the macro?

Also, I'm also not sure what the CMake compiler setup is. If a compiler is by default a HIP compiler, is it right to tell CMake that this is the regular C ++ compiler and go ahead testing its OpenMP capabilities yourself?

https://github.com/llvm/llvm-project/pull/176791


More information about the cfe-commits mailing list