-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Replace -O and -g with -C before handling options #32399
Conversation
r? @Aatch (rust_highfive has picked a reviewer for you, use r? to override) |
Travis failed because of conflict with #32369. (No textual conflict, but it changed Vec to slice.) |
I'm not sure that this is the best way to implement a change like this, it's modifying pre-parsed options which could perhaps mess with parsing other options. For example what if an argument to another argument is the string This is also a semantic change which may or may not be intended, I kinda forget the original motivation here... cc @rust-lang/tools |
I would like to see some discussion of #32352 before landing a PR. Perhaps an internals thread? Given that it is the interface to the compiler, maybe even an RFC. |
Sorry, I think I misunderstood that issue, it's not actually proposing anything new, just better handling overlap. In which case it seems more like just a bug. |
Rebased. |
This continues to not handle the case I mentioned which I would personally consider a blocker for this. |
Is this possible? I failed to come up with such |
This may involve tweaking getopts perhaps to learn about the position of arguments. Either that or we could just change the semantics so the opt level is the max, not the rightmost one (which makes more sense to me at least) |
"max not rightmost" would be different from GCC.
|
Right, it's just easier to implement that a modification to getopts to track where each option came from positionally which I believe is the other alternative here. |
What about this case? (message is printed in plain text, no hint it's an error)
after providing |
Closing due to inactivity, but feel free to resubmit with comments addressed! |
Fix #32352.