about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/allocator.rs
diff options
context:
space:
mode:
authorquininer <quininer@live.com>2023-11-09 16:46:32 +0800
committerquininer <quininer@live.com>2023-12-31 15:27:43 +0800
commit12784c31669d7c9e69b49aa5776f8a4e55c319a8 (patch)
tree428d6a1d8c77533a49e1f33d0c6c239c1636e481 /compiler/rustc_codegen_llvm/src/allocator.rs
parentfcfe05aa7538fbb18fc3baff9aabdf9a1cd14b1e (diff)
downloadrust-12784c31669d7c9e69b49aa5776f8a4e55c319a8.tar.gz
rust-12784c31669d7c9e69b49aa5776f8a4e55c319a8.zip
Add -Zuse-sync-unwind
This flag specifies whether LLVM generates async unwind or sync unwind.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/allocator.rs')
-rw-r--r--compiler/rustc_codegen_llvm/src/allocator.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_llvm/src/allocator.rs b/compiler/rustc_codegen_llvm/src/allocator.rs
index 58b3aa438c5..ca376029735 100644
--- a/compiler/rustc_codegen_llvm/src/allocator.rs
+++ b/compiler/rustc_codegen_llvm/src/allocator.rs
@@ -134,7 +134,8 @@ fn create_wrapper_function(
             llvm::LLVMRustSetVisibility(llfn, llvm::Visibility::Hidden);
         }
         if tcx.sess.must_emit_unwind_tables() {
-            let uwtable = attributes::uwtable_attr(llcx);
+            let uwtable =
+                attributes::uwtable_attr(llcx, tcx.sess.opts.unstable_opts.use_sync_unwind);
             attributes::apply_to_llfn(llfn, llvm::AttributePlace::Function, &[uwtable]);
         }