[llvm] [Offload] Prevent by default passing CMAKE_CXX_FLAGS to GPU build (PR #160881)
Joseph Huber via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 29 11:25:08 PDT 2025
jhuber6 wrote:
> I agree that this should be documented properly. And I personally would say that the update to the documentation should be part of this PR.
>From https://openmp.llvm.org/SupportAndFAQ.html#q-how-to-build-an-openmp-gpu-offload-capable-compiler
> Support for the device library comes from a separate build of the OpenMP library that targets the GPU architecture. Building it requires enabling the runtime targets, or setting the target manually when doing a standalone build. This is done with the LLVM_RUNTIME_TARGETS option and then enabling the OpenMP runtime for the GPU target via RUNTIMES_<triple>_LLVM_ENABLE_RUNTIMES. It’s possible to set different flags for each device library by using RUNTIMES_<triple>_CMAKE_CXX_FLAGS. Refer to the cache file for the specific invocation.
https://github.com/llvm/llvm-project/pull/160881
More information about the llvm-commits
mailing list