[clang] [Clang][OpenMP] Fix multi arch compilation for -march option (PR #92290)

Saiyedul Islam via cfe-commits cfe-commits at lists.llvm.org
Wed May 15 11:06:09 PDT 2024


saiislam wrote:

> I don't think we want to support this. `-march` was the wrong option to use in the first place, and upstream LLVM never supported specifying multiple device images with `-march` so there isn't a legacy argument in trunk. However, AOMP did support this and if it's deemed too disruptive to request users move to `--offload-arch=a,b,c` then we can carry that change in the fork.
> 
> > It will fix tests like: [targetid_multi_image](https://github.com/ROCm/aomp/tree/aomp-dev/test/smoke/targetid_multi_image)
> 
> I think the easier way to fix this is to update the Makefile.

Irrespective of what AOMP does, I think it makes sense to ensure parity between the two ways of specifying architecture. People have been historically using `-Xopenmp-target -march` style, and using the same for multiple architectures seems to be the most obvious choice.
Isn't it quite confusing to tell the users that they can use `offload-arch` style for single as well as multiple archs, but can use `-march` style only for single arch?

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


More information about the cfe-commits mailing list