rust/compiler/rustc_codegen_llvm/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
..
back Fix clippy::needless_borrow in the compiler 2023-11-21 20:13:40 +01:00
coverageinfo Replace custom_encodable with encodable. 2023-11-22 18:37:14 +11:00
debuginfo Fix clippy::needless_borrow in the compiler 2023-11-21 20:13:40 +01:00
llvm consts: remove dead code around i1 constant values 2023-11-03 15:40:17 -04:00
abi.rs Fix clippy::needless_borrow in the compiler 2023-11-21 20:13:40 +01:00
allocator.rs Fix clippy::needless_borrow in the compiler 2023-11-21 20:13:40 +01:00
asm.rs Auto merge of #114467 - Amanieu:asm-unstable-features, r=davidtwco 2023-08-15 11:59:02 +00:00
attributes.rs Fix clippy::needless_borrow in the compiler 2023-11-21 20:13:40 +01:00
base.rs cg_llvm: remove pointee types and pointercast/bitcast-of-ptr 2023-07-29 13:18:17 -04:00
builder.rs Format all the let chains in compiler 2023-10-13 08:59:36 +00:00
callee.rs Fix clippy::needless_borrow in the compiler 2023-11-21 20:13:40 +01:00
common.rs Ensure strings created with const_str get the unnamed_addr attribute 2023-11-15 07:56:40 +00:00
consts.rs Fix clippy::needless_borrow in the compiler 2023-11-21 20:13:40 +01:00
context.rs convert ehcont-guard to an unstable option 2023-11-21 14:24:23 -08:00
declare.rs CFI: Fix SIGILL reached via trait objects 2023-05-09 20:04:19 +00:00
errors.rs warn when using an unstable feature with -Ctarget-feature 2023-11-06 09:44:00 +01:00
intrinsic.rs Merge simd size and type extraction into checking whether a type is simd, as these always go together. 2023-10-31 11:23:39 +00:00
lib.rs Bump cfg(bootstrap)s 2023-11-15 19:41:28 -05:00
llvm_util.rs Fix clippy::needless_borrow in the compiler 2023-11-21 20:13:40 +01:00
mono_item.rs use visibility to check unused imports and delete some stmts 2023-10-22 21:27:46 +08:00
type_.rs Fix misuses of a vs an 2023-10-04 08:01:11 +08:00
type_of.rs s/Generator/Coroutine/ 2023-10-20 21:10:38 +00:00
va_arg.rs cg_llvm: remove pointee types and pointercast/bitcast-of-ptr 2023-07-29 13:18:17 -04:00
value.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00