[PATCH] D128090: [Clang][OpenMP] Process multi-arch compilation options given via -march

Joseph Huber via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 13 10:34:00 PDT 2022


jhuber6 added a subscriber: tra.
jhuber6 added a comment.

In D128090#3648879 <https://reviews.llvm.org/D128090#3648879>, @saiislam wrote:

> `-Xopenmp-target -march ` used to be the only option to target a specific sub arch before `--offload-arch`. But, it doesn't support multiple archs.
> This patch relies on infra used by `--offload-arch` to support this verbose method of specifying multiple archs.
>
> Use case: people already familiar with `-Xopenmp-target -march` option are likely to use the same for multiple archs, until they learn about shorthand representation, `--offload-arch`.

Overloading the meaning of `-march` might not work here. Typically `-march` is just checked via `Args.getLastArg()`, so repeated uses just override the last one. I'm not exactly sure what the expected use is however, maybe @tra can help there. Although we could consider ones contained inside of `-Xopenmp-target=` to be different. That being said, if we wanted to support this I think the easiest way to do it would be to add handling for `-march` in the source here <https://github.com/llvm/llvm-project/blob/main/clang/lib/Driver/Driver.cpp#L4361>.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D128090/new/

https://reviews.llvm.org/D128090



More information about the cfe-commits mailing list