[PATCH] D76520: [CUDA][HIP] Add -Xarch_device and -Xarch_host options

Artem Belevich via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 23 09:48:41 PDT 2020


tra added a comment.

In D76520#1936837 <https://reviews.llvm.org/D76520#1936837>, @yaxunl wrote:

> -Xarch_ works with driver options having value, e.g. `-fcf-protection=branch`. I added a test for that.
>
> `-mframe-pointer=none` is a cc1 option. That's why it cannot be passed by -Xarch_. If it is made a driver option it can be passed.


In other words, if we need to pass a cc1 option to a specific sub-compilation, we'll need an arch-specific `-Xclang` variant. Does `-Xarch_foo -Xclang -Xarch_foo <foo-specific cc1 option>` work with this patch? Considering that sub-compilations *are* cc1 invocations, passing cc1 options is something that would be very useful as not all cc1 options can be directly controlled from the driver level, but most driver options not directly related to the pipeline construction can be overridden by cc1 options.


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

https://reviews.llvm.org/D76520





More information about the cfe-commits mailing list