rust/compiler/rustc_session/src
Michael Goulet 1fb2624205
Rollup merge of #118013 - sivadeilra:user/ardavis/ehcont, r=wesleywiser
Enable Rust to use the EHCont security feature of Windows

In the future Windows will enable Control-flow Enforcement Technology (CET aka Shadow Stacks). To protect the path where the context is updated during exception handling, the binary is required to enumerate valid unwind entrypoints in a dedicated section which is validated when the context is being set during exception handling.

The required support for EHCONT Guard has already been merged into LLVM, long ago. This change simply adds the Rust codegen option to enable it.

Relevant LLVM change: https://reviews.llvm.org/D40223

This also adds a new `ehcont-guard` option to the bootstrap config which enables EHCont Guard when building std.

We at Microsoft have been using this feature for a significant period of time; we are confident that the LLVM feature, when enabled, generates well-formed code.

We currently enable EHCONT using a codegen feature, but I'm certainly open to refactoring this to be a target feature instead, or to use any appropriate mechanism to enable it.
2023-11-22 09:28:50 -08:00
..
config Change process spawning to inherit the parent's signal mask by default 2022-10-20 14:53:38 -07:00
code_stats.rs Use the actual computed crate name for -Zprint-vtable-sizes 2023-11-05 16:29:15 +00:00
config.rs Auto merge of #118071 - Urgau:check-cfg-cargo-feature, r=petrochenkov 2023-11-22 07:31:13 +00:00
cstore.rs Use FreezeLock for CStore 2023-09-09 16:02:11 +02:00
errors.rs Remove cgu_reuse_tracker from Session 2023-10-09 18:39:41 +00:00
filesearch.rs bump windows crate 0.46 -> 0.48 in workspace 2023-05-09 18:20:13 +03:00
lib.rs Parse rustc version at compile time 2023-10-26 18:55:05 -07:00
options.rs convert ehcont-guard to an unstable option 2023-11-21 14:24:23 -08:00
output.rs Format all the let chains in compiler 2023-10-13 08:59:36 +00:00
parse.rs Make Cfg and CheckCfg non-generic. 2023-10-30 14:12:53 +11:00
search_paths.rs Provide more context for rustc +nightly -Zunstable-options on stable 2023-06-27 23:23:33 +08:00
session.rs Fix clippy::needless_borrow in the compiler 2023-11-21 20:13:40 +01:00
utils.rs Format all the let chains in compiler 2023-10-13 08:59:36 +00:00
version.rs Simplify the current_rustc_version macro. 2023-11-10 10:54:21 +11:00