-Ccontrol-flow-guard
should raise an error on unsupported platforms
#91060
Labels
A-security
Area: Security (example: address space layout randomization).
C-bug
Category: This is a bug.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
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.The text was updated successfully, but these errors were encountered: