[PATCH] D140224: [Driver] Revert D139717 and add -Xparser instead

Fangrui Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 22 15:27:05 PST 2022


MaskRay added a comment.

In D140224#4014246 <https://reviews.llvm.org/D140224#4014246>, @davide wrote:

> In D140224#4014245 <https://reviews.llvm.org/D140224#4014245>, @MaskRay wrote:
>
>> In D140224#4014234 <https://reviews.llvm.org/D140224#4014234>, @davide wrote:
>>
>>> In D140224#4014230 <https://reviews.llvm.org/D140224#4014230>, @MaskRay wrote:
>>>
>>>> In D140224#4014203 <https://reviews.llvm.org/D140224#4014203>, @davide wrote:
>>>>
>>>>> @MaskRay Roy hasn't replied. We found other spellings that break (e.g. `-Xcctests` or something). Revert this patch until we find an agreement.
>>>>
>>>> D139717 <https://reviews.llvm.org/D139717> (this patch reverts) was pushed when I made valid comments which were ignored. I did not complain for that.
>>>>
>>>> I don't mind if you work around `-Xcctests` in a similar way.
>>>
>>> Working around 3 cases creates more complexity than it fixes.
>>> We're also not providing a deprecation path for users. This needs to be discussed more thoroughly. I'll go ahead and revert to the previous status.
>>>
>>> Thanks.
>>
>> Have you seen https://reviews.llvm.org/D139717#4001712 I have analyzed that such `-X*` has `-Wunused-command-line-argument` warning for many many years.
>> I'm not sure how is considered insufficient.
>>
>> "Working around 3 cases creates more complexity than it fixes." the number isn't that high. By enumerating the misuse, we have a valid path to remove all workarounds as misuses are fixed.
>> This made some forward progress.
>
> You can't just remove options willy-nilly. This is not how drivers work. The warning says "unused", it doesn't say "it goes away".
> If we want to provide a path forward, we first need to reinstate this, then change the warning, then remove (in 1 year or something).
> That's how transitions work.
>
> HTH.

I almost agree with you, but only for actually-used options which do real work instead of ignored options.
If it is pure compatibility option, I wish that there is public references instead of pure internal build uses.
For Joined `-X` I am unsure I want to take your opinion.

Neither sourcegraph nor search/Debian Code Search shows anything about `-Xcctests`.
Separate `-Xlinker ` still exists: not removed by this patch. `-Xlinker=` is invalid. Note that many references on a code search website reveal libtool uses instead of compiler driver uses.
If your internal build uses many `-X*` forms, I am fine with ignoring them. If there are so many that you want to ignore `-X*`, I think I am fine as well, but ideally restricted to Apple platforms (ideally show some external usage examples).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D140224



More information about the cfe-commits mailing list