about summary refs log tree commit diff
path: root/compiler/rustc_session
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-01-09 05:33:20 +0100
committerGitHub <noreply@github.com>2024-01-09 05:33:20 +0100
commit9e4843e42ed0d803c62d72a9819688a67484465d (patch)
treeff2bc9eb411d45767200cfad895b7b419e3af129 /compiler/rustc_session
parentd6affcf520091fd0f48df1a2b6bfcb9ef48e0f40 (diff)
parent12784c31669d7c9e69b49aa5776f8a4e55c319a8 (diff)
downloadrust-9e4843e42ed0d803c62d72a9819688a67484465d.tar.gz
rust-9e4843e42ed0d803c62d72a9819688a67484465d.zip
Rollup merge of #117744 - quininer:add-z-sync-uw, r=bjorn3
Add -Zuse-sync-unwind

Currently Rust uses async unwind by default, but async unwind will bring non-negligible size overhead. it would be nice to allow users to choose this.

In addition, async unwind currently prevents LLVM from generate compact unwind for MachO, if one wishes to generate compact unwind for MachO, then also needs this flag.
Diffstat (limited to 'compiler/rustc_session')
-rw-r--r--compiler/rustc_session/src/options.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/rustc_session/src/options.rs b/compiler/rustc_session/src/options.rs
index 842bf1d60f6..9c1c1c491b9 100644
--- a/compiler/rustc_session/src/options.rs
+++ b/compiler/rustc_session/src/options.rs
@@ -1960,6 +1960,8 @@ written to standard error output)"),
         "adds unstable command line options to rustc interface (default: no)"),
     use_ctors_section: Option<bool> = (None, parse_opt_bool, [TRACKED],
         "use legacy .ctors section for initializers rather than .init_array"),
+    use_sync_unwind: Option<bool> = (None, parse_opt_bool, [TRACKED],
+        "Generate sync unwind tables instead of async unwind tables (default: no)"),
     validate_mir: bool = (false, parse_bool, [UNTRACKED],
         "validate MIR after each transformation"),
     #[rustc_lint_opt_deny_field_access("use `Session::verbose_internals` instead of this field")]