llvm-project
9931b783 - [Clang] Add multilib support for GPU targets (#192285)

Commit
16 days ago
[Clang] Add multilib support for GPU targets (#192285) Summary: This PR uses the new, generic multilib support added in https://github.com/llvm/llvm-project/pull/188584 to also function for GPU targets. This will allow toolchains to easy provide variants of these GPU libraries (for debug or asan). In practice, this will look something like this: ```console -DRUNTIMES_amdgcn-amd-amdhsa+debug_CMAKE_BUILD_TYPE=Debug \ -DRUNTIMES_amdgcn-amd-amdhsa+debug_LIBOMPTARGET_ENABLE_DEBUG=ON \ -DRUNTIMES_amdgcn-amd-amdhsa+debug_LLVM_ENABLE_RUNTIMES=openmp \ -DLLVM_RUNTIME_MULTILIBS=debug \ -DLLVM_RUNTIME_MULTILIB_debug_TARGETS="amdgcn-amd-amdhsa" \ ``` This will then install it into the tree like this: ``` <install>/lib/amdgcn-amd-amdhsa/debug/libompdevice.a ``` The user can then activate this like the following (assuming they have a multilib.yaml in the library directory): ``` clang input.c -fopenmp --offload-arch=gfx942 -fmultilib-flag=debug ```
Author
Parents
Loading