New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix Issue 22567, 22568, 22571 - Remove -target option from CLI #13782
base: master
Are you sure you want to change the base?
Conversation
Thanks for your pull request, @ibuclaw! Bugzilla references
Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub run digger -- build "master + dmd#13782" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Scoring major points with this one :P
Where's my medal? :-) |
If you're doing cross compilation, do it right. Those mishmash of flags is not the way to do it. And that misses C/C++ runtime versions, The whole point of target is so you don't forget all those things you need to specify. |
Note also that issue 22568 affects |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be fixed properly not removed.
Actually,
|
I said equally, not, doesn't work. IIRC that was fixed, looks like you found that too. |
Any effort trying to improve dmd-specific driver handling is better spent elsewhere. |
We should be careful of downstream wrappers of DMD arguments and fix them before doing this. |
-target doesn't work, so there are doubts that there are even any downstream uses. |
On LDC, e.g., if you specify |
I'd imagine that LDC would have its own option parser, and its own main function, so changes to |
I'm rather talking about |
No.
Those kind of wrappers are not a downstream, unlike dub, for instance. |
Ah yeah, GCC compilers work that way, nevermind then.
I meant LDC upstream, sorry. @kinke or I can make a patch to fix this, if this is going forward. |
Well, wrappers are free to do whatever. So nothing
Well, in practice, the only useful thing that a dmd-wrapper for gdc could do is call
That the wrapper is in-tree means that it's closely tied to ldc2 anyway, so there's not much concern for it. It is free to support more options than what dmd does for "legacy" reasons. |
I mean, when we want to have flags compatible for either DMD and other compilers.
I also tend to agree with @thewilsonator , we should try to fix it rather than remove it. |
The history of If there is desire to implement the |
Er, no.
22571 is really two issues:
22567 is a blocker for the use of In summary: 22568 is fixed, 22571 is not a severity I will take a proper look at 22571 over the weekend. |
So how do we get out of this stale mate? cc @WalterBright |
Apologies I've been quite busy I'll try to get this done today or tomorrow. |
This option is not useful for DMD given its limited range of supported targets. The option itself has been made mostly redundant by the combination of
-mcpu=
,-m32
,-m64
, and-os=
flags anyway.GDC target options are handled by the back-end, so none of this code is friendly for the "common" front-end interface.
That leaves LDC as possibly the only downstream user who may benefit from this, however there should be no reason why it can't be kept internal to LDC itself - though I'd have thought that they are already doing this with their
-mtriple=
option.