Skip to content

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

Description

@bluss

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-frontendArea: Compiler frontend (errors, parsing and HIR)C-enhancementCategory: An issue proposing an enhancement or a PR with one.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions