[flang-commits] [clang] [flang] [Clang] Introduce '--offload-targets' for `-fopenmp-targets` (PR #146594)

Joseph Huber via flang-commits flang-commits at lists.llvm.org
Tue Jul 1 13:18:02 PDT 2025


jhuber6 wrote:

> Why not stick with `--offload-arch` for generic use? I'm not really sure about the motivation.

This is the main problem I have with a lot of the offloading infrastructure. As far as I see it `--offload-arch=` is intended to behave like the `-mcpu` value but it's pulling double duty by also using *known* CPU names to *infer* the toolchain triple. We can still *do* that, I'm not planning on changing it, but I think it makes the infrastructure much easier to build on if we have a generic way to create an offloading toolchain in the same vein of `--target=`. I've had qualms with this since we do things like `--offload-arch=amdgcnspirv,gfx942` which implicitly creates two separate toolchains with incompatible triples.

I'm open to suggestions however.

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


More information about the flang-commits mailing list