[PATCH] D135076: [Clang] Make offloading flags accept '-' and '--'
Joseph Huber via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 3 09:22:28 PDT 2022
jhuber6 added a comment.
In D135076#3830972 <https://reviews.llvm.org/D135076#3830972>, @MaskRay wrote:
> There are traditionally some single-dash long options (perhaps classical Mac OS style) which conflict with short options. I think nowadays we try to avoid such single-dash short options.
> (For example, GNU ld now requires all new long options to use two-dashes, after knowing the problem with `-omagic`.)
>
> I can make a patch to make cc1 `-o` `Separate` instead of `JoinedOrSeparate`, which will hopefully solve your pain of specifying a misspelled `-offloat*` cc1 option without good diagnostics.
If that's possible, then that would be a good solution. I figured that allowing `-ofoo` was set in stone and this was the less controversial option. Just for reference, the problem I commonly encounter with users is the following situation
clang foo.cu -offload-arch=sm_80 -o foo // No offload arch, the first -o isn't observed as its replaced by the second one.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D135076/new/
https://reviews.llvm.org/D135076
More information about the cfe-commits
mailing list