[libc] [llvm] [openmp] [libc] Rework the GPU build to only target a single architecture (PR #81644)

Joseph Huber via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 13 11:08:17 PST 2024


jhuber6 wrote:

> In the future it might still be useful to have a specific targeting mechanism for machine linking libc

I'm planning on reworking that vast majority of this code in the future. That will include having a big IR blob that contains all the `libc` code. We could potentially just compile that for multiple architectures and install it as `amdgcn-amd-amdhsa/gfx9/libc.o` or something as a secondary install phase. However, I think the important part is that the IR itself can be "retargeted". I.e.
```
clang app.c --target=amdgcn-amd-amdhsa -flto -c
clang app.o --target=amdgcn-amd-amdhsa -mcpu=gfx940 -o a.out
```

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


More information about the llvm-commits mailing list