Open
Description
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.