[Openmp-commits] [llvm] [openmp] [OpenMP] Change build of OpenMP device runtime to be a separate runtime (PR #136729)
Joseph Huber via Openmp-commits
openmp-commits at lists.llvm.org
Sat Aug 2 07:50:09 PDT 2025
jhuber6 wrote:
> > Is this for `libomp`?
>
> Yes, `-DLLVM_ENABLE_RUNTIMES=openmp`.
>
> > This only affects the GPU build. That bug you linked sounds weird, I'm guessing we add that to the required flags for flag detection?
>
> I guess so. It's pretty clear to me that adding C++-specific flags to `CMAKE_REQUIRED_FLAGS` is wrong, but I presume that there is a reason that the code didn't use `CMAKE_CXX_FLAGS` instead.
CMake's handling of compiler flag checks is very unfortunate. It just uses `CMAKE_REQUIRED_FLAGS` as global state and passes it to `cxx ${CMAKE_REQUIRED_FLAGS} ${FLAG_TO_CHECK}` which runs both the compile step and link step. I wish there were a more customizable way to pass flags on a per-check.
https://github.com/llvm/llvm-project/pull/136729
More information about the Openmp-commits
mailing list