Skip to content

-Ccontrol-flow-guard should raise an error on unsupported platforms #91060

Open
@nagisa

Description

@nagisa

Right now specifying -Ccontrol-flow-guard and targetting a non-msvc platform will silently ignore the -Ccontrol-flow-guard option. Given the purpose of the flag and the audience Rust targets, I think this is an ill-considered behaviour. Especially of concern I think is when a non-MSVC windows target is used. An engineer might think the mitigations are enabled and the code would work fine in their testing, possibly only because the mitigations were never really turned on!

I believe that mitigation-related flags are sensitive enough to warrant an error when rustc isn't able to implement those mitigations for the artifact.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-securityArea: Security (example: address space layout randomization).C-bugCategory: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions