Skip to content

rustc should accept rustc -O -C opt-level=x #32352

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
bluss opened this issue Mar 19, 2016 · 1 comment · Fixed by #60426
Closed

rustc should accept rustc -O -C opt-level=x #32352

bluss opened this issue Mar 19, 2016 · 1 comment · Fixed by #60426
Labels
A-frontend Area: Compiler frontend (errors, parsing and HIR) C-enhancement Category: An issue proposing an enhancement or a PR with one.

Comments

@bluss
Copy link
Member

bluss commented Mar 19, 2016

rustc -O -O is ok just like rustc -C opt-level=1 -C opt-level=2. -O is documented to be the same as -C opt-level=2, so there should be no conflict, just have the last argument take precedent.

-g vs -C debuginfo=2 behave the same way.

$ rustc -O -C opt-level=2
error: -O and -C opt-level both provided

$ rustc -C opt-level=1 -C opt-level=2 -g -g foo.rs
# ok.
@steveklabnik steveklabnik added A-frontend Area: Compiler frontend (errors, parsing and HIR) C-enhancement Category: An issue proposing an enhancement or a PR with one. labels Jul 25, 2016
@steveklabnik
Copy link
Member

Triage: no change

bors added a commit that referenced this issue May 3, 2019
Update getopts

This is a prerequisite to fixing #32352. The rustbuild fix has been pulled out of #59440.

r? @alexcrichton
Centril added a commit to Centril/rust that referenced this issue May 3, 2019
…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
bors added a commit that referenced this issue May 4, 2019
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 #7493.
Fixes #32352.

~Blocked on rust-lang/getopts#79

r? @alexcrichton
Manishearth added a commit to Manishearth/rust that referenced this issue May 5, 2019
…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
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-frontend Area: Compiler frontend (errors, parsing and HIR) C-enhancement Category: An issue proposing an enhancement or a PR with one.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants