diff options
| author | Reuben Cruise <reuben.cruise@arm.com> | 2025-09-01 16:53:50 +0100 |
|---|---|---|
| committer | Reuben Cruise <reuben.cruise@arm.com> | 2025-09-17 14:16:31 +0100 |
| commit | 6f813e887af44d74e9bcfdb207ecab407037a939 (patch) | |
| tree | 73791884e5f61983e200be3b173f58d71a090f41 /compiler/rustc_session | |
| parent | 2ebb1263e3506412889410b567fa813ca3cb5c63 (diff) | |
| download | rust-6f813e887af44d74e9bcfdb207ecab407037a939.tar.gz rust-6f813e887af44d74e9bcfdb207ecab407037a939.zip | |
Adds AArch64 GCS support
- Adds option to rustc config to enable GCS - Passes `guarded-control-stack` flag to llvm if enabled
Diffstat (limited to 'compiler/rustc_session')
| -rw-r--r-- | compiler/rustc_session/src/config.rs | 1 | ||||
| -rw-r--r-- | compiler/rustc_session/src/options.rs | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/compiler/rustc_session/src/config.rs b/compiler/rustc_session/src/config.rs index 297df7c2c97..8d9f424f1fe 100644 --- a/compiler/rustc_session/src/config.rs +++ b/compiler/rustc_session/src/config.rs @@ -1615,6 +1615,7 @@ pub struct PacRet { pub struct BranchProtection { pub bti: bool, pub pac_ret: Option<PacRet>, + pub gcs: bool, } pub(crate) const fn default_lib_output() -> CrateType { diff --git a/compiler/rustc_session/src/options.rs b/compiler/rustc_session/src/options.rs index 69facde6936..7956a06f6a9 100644 --- a/compiler/rustc_session/src/options.rs +++ b/compiler/rustc_session/src/options.rs @@ -866,7 +866,7 @@ mod desc { pub(crate) const parse_polonius: &str = "either no value or `legacy` (the default), or `next`"; pub(crate) const parse_stack_protector: &str = "one of (`none` (default), `basic`, `strong`, or `all`)"; - pub(crate) const parse_branch_protection: &str = "a `,` separated combination of `bti`, `pac-ret`, followed by a combination of `pc`, `b-key`, or `leaf`"; + pub(crate) const parse_branch_protection: &str = "a `,` separated combination of `bti`, `gcs`, `pac-ret`, (optionally with `pc`, `b-key`, `leaf` if `pac-ret` is set)"; pub(crate) const parse_proc_macro_execution_strategy: &str = "one of supported execution strategies (`same-thread`, or `cross-thread`)"; pub(crate) const parse_remap_path_scope: &str = @@ -1903,6 +1903,7 @@ pub mod parse { Some(pac) => pac.pc = true, _ => return false, }, + "gcs" => slot.gcs = true, _ => return false, }; } |
