Page MenuHomePhabricator

[NFC] Refactor handling of Xarch option
ClosedPublic

Authored by yaxunl on Mar 19 2020, 2:15 PM.

Details

Summary

Extract common code to a function. To prepare for adding an option for CUDA/HIP host and device only option.

Diff Detail

Event Timeline

yaxunl created this revision.Mar 19 2020, 2:15 PM
tra added a comment.Mar 19 2020, 2:51 PM

+1 for refactoring, but what's the long term plan.
Long time ago echristo@ and I had a vague idea to change clang's option parsing to allow something like -Xarch_host <host-only args> -Xarch_device <args for all GPU compilations...> -Xarch=<target> <options for <target> only...>

In D76455#1932232, @tra wrote:

+1 for refactoring, but what's the long term plan.
Long time ago echristo@ and I had a vague idea to change clang's option parsing to allow something like -Xarch_host <host-only args> -Xarch_device <args for all GPU compilations...> -Xarch=<target> <options for <target> only...>

Yes I have patch for this which is half done.

tra accepted this revision.Mar 19 2020, 3:55 PM
This revision is now accepted and ready to land.Mar 19 2020, 3:55 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptMar 22 2020, 11:45 AM