From 9412bfb9b7f2cff7c451fa2946e8999ec59dd715 Mon Sep 17 00:00:00 2001 From: Antoni Boucher Date: Mon, 3 Aug 2026 09:33:26 -0400 Subject: [PATCH] Only emit -fno-asynchronous-unwind-tables when we should not emit unwind tables --- src/gcc_util.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gcc_util.rs b/src/gcc_util.rs index 4d7f2cdbb92..d986dc68e67 100644 --- a/src/gcc_util.rs +++ b/src/gcc_util.rs @@ -157,8 +157,9 @@ pub fn new_context<'gcc>(sess: &Session) -> Context<'gcc> { version, )); } - // FIXME(antoyo): check if this should only be added when using -Cforce-unwind-tables=n. - context.add_command_line_option("-fno-asynchronous-unwind-tables"); + if !sess.must_emit_unwind_tables() { + context.add_command_line_option("-fno-asynchronous-unwind-tables"); + } if sess.panic_strategy().unwinds() { context.add_command_line_option("-fexceptions");