Stop -O/-C opt-level and -g/-C debuginfo conflicting#60426
Stop -O/-C opt-level and -g/-C debuginfo conflicting#60426bors merged 7 commits intorust-lang:masterfrom
-O/-C opt-level and -g/-C debuginfo conflicting#60426Conversation
There was a problem hiding this comment.
Ideas for checking this in the test are welcome!
-O and -C opt-level, and -g and -C debuginfo, conflicting-O/-C opt-level and -g/-C debuginfo conflicting
|
Looks reasonable to me! I think testing manually here is fine for now, I also don't know of a great way to test that the right setting is applied. Could this also include a small comment in the argument parsing about how it's finding the last option specified? |
Done. |
|
r=me when this is ready to go |
18ca3d8 to
f6b5e8a
Compare
|
@bors r=alexcrichton |
|
📌 Commit f6b5e8a has been approved by |
|
@bors rollup |
|
@bors rollup- (don't rollup PRs that touch |
…r=alexcrichton Stop `-O`/`-C opt-level` and `-g`/`-C debuginfo` conflicting Allow `-O` and `-C opt-level`, and `-g` and `-C debuginfo` to be specified simultaneously without conflict. In such cases, the rightmost provided option is chosen. Fixes rust-lang#7493. Fixes rust-lang#32352. ~Blocked on rust-lang/getopts#79 r? @alexcrichton
https://travis-ci.com/rust-lang/rust/jobs/197566788 via #60519 |
|
@bors r- |
|
☔ The latest upstream changes (presumably #60117) made this pull request unmergeable. Please resolve the merge conflicts. |
2eec7f5 to
5ba5d35
Compare
|
@bors r=alexcrichton |
|
📌 Commit 5ba5d35 has been approved by |
|
@bors r=alexcrichton |
|
📌 Commit 80f54ba has been approved by |
|
⌛ Testing commit 80f54ba with merge 231d2cd07198440faf373029ea581e2450e61825... |
|
💔 Test failed - checks-travis |
|
The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
|
@bors retry |
|
These command line flags can conflict though. Why should we not emit an error? |
…r=alexcrichton Stop `-O`/`-C opt-level` and `-g`/`-C debuginfo` conflicting Allow `-O` and `-C opt-level`, and `-g` and `-C debuginfo` to be specified simultaneously without conflict. In such cases, the rightmost provided option is chosen. Fixes rust-lang#7493. Fixes rust-lang#32352. ~Blocked on rust-lang/getopts#79 r? @alexcrichton
Rollup of 5 pull requests Successful merges: - #60131 (Fix broken link in rustc_plugin doc) - #60426 (Stop `-O`/`-C opt-level` and `-g`/`-C debuginfo` conflicting) - #60515 (use span instead of div for since version) - #60530 (rustc: rename all occurences of "freevar" to "upvar".) - #60536 (Correct code points to match their textual description) Failed merges: r? @ghost
|
@Zoxc: the original issue threads contain motivation. Flags in general can be specified multiple times and |
|
I guess nonsensical things like |
|
It's not nonsensical, it's needed for hierarchical build systems. |
|
s/hierarchical/broken/ |
|
|
||
| # FIXME: it would be good to check that it's actually the rightmost flags | ||
| # that are used when multiple flags are specified, but I can't think of a | ||
| # reliable way to check this. |
There was a problem hiding this comment.
Can't we make rustc show or warn to stderr about which flag it chose? "Note: both foo and bar specified. Using bar", then, we could just capture its output and compare.
There was a problem hiding this comment.
(cc @varkor for his comment on #60426 (comment) which I read just now)
Allow
-Oand-C opt-level, and-gand-C debuginfoto be specified simultaneously without conflict. In such cases, the rightmost provided option is chosen.Fixes #7493.
Fixes #32352.
Blocked on rust-lang/getopts#79.r? @alexcrichton