[clang] [llvm] [OpenMP] Remove 'libomptarget.devicertl.a' fatbinary and use static library (PR #126143)

Michał Górny via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 19 10:03:04 PDT 2025


mgorny wrote:

> It should only be invoking `nvptx-arch` if the user passed `-march=native`.

Sorry, didn't notice this sentence. Well, *I am* building with `-march=native` here — after all, other files are built for a CPU. If I change it to, say, `-march=zen2`, then it indeed compiles, with a lot of warnings:

```
'zen2' is not a recognized processor for this target (ignoring processor)
'zen2' is not a recognized processor for this target (ignoring processor)
'zen2' is not a recognized processor for this target (ignoring processor)
'zen2' is not a recognized processor for this target (ignoring processor)
'zen2' is not a recognized processor for this target (ignoring processor)
'zen2' is not a recognized processor for this target (ignoring processor)
```

To be honest, this only proves my point — you shouldn't be invoking `CMAKE_CXX_COMPILER` when you're building for a GPU, since it's a compiler configured to be building for the host CPU.

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


More information about the llvm-commits mailing list