[all-commits] [llvm/llvm-project] 9931b7: [Clang] Add multilib support for GPU targets (#192...

Joseph Huber via All-commits all-commits at lists.llvm.org
Thu Apr 16 12:15:51 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9931b7830f5a411cfdb1bc1f819601a8217a4a21
      https://github.com/llvm/llvm-project/commit/9931b7830f5a411cfdb1bc1f819601a8217a4a21
  Author: Joseph Huber <huberjn at outlook.com>
  Date:   2026-04-16 (Thu, 16 Apr 2026)

  Changed paths:
    M clang/lib/Driver/ToolChains/AMDGPU.cpp
    M clang/lib/Driver/ToolChains/Clang.cpp
    M clang/lib/Driver/ToolChains/Cuda.cpp
    A clang/test/Driver/amdgpu-multilib.yaml
    A clang/test/Driver/nvptx-multilib.yaml

  Log Message:
  -----------
  [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
```



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list