From f47ee036cf07028661fad91d920e3d4d150cc54c Mon Sep 17 00:00:00 2001 From: Cody Tapscott Date: Mon, 24 May 2021 16:36:06 -0700 Subject: [PATCH] Force `.eh_frame` emission on AArch64 We need to force the emission of the EH Frame section (currently done via SupportsCompactUnwindWithoutEHFrame in the MCObjectFileInfo for the target), since libunwind doesn't yet support dynamically registering compact unwind information at run-time. (cherry picked from commit 60e041894288848e37870c42749a1aabcc2c2274) --- llvm/lib/MC/MCObjectFileInfo.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/llvm/lib/MC/MCObjectFileInfo.cpp b/llvm/lib/MC/MCObjectFileInfo.cpp index 7ea1106068b74..cf79bb2baf09c 100644 --- a/llvm/lib/MC/MCObjectFileInfo.cpp +++ b/llvm/lib/MC/MCObjectFileInfo.cpp @@ -58,9 +58,10 @@ void MCObjectFileInfo::initMachOMCObjectFileInfo(const Triple &T) { MachO::S_ATTR_STRIP_STATIC_SYMS | MachO::S_ATTR_LIVE_SUPPORT, SectionKind::getReadOnly()); - if (T.isOSDarwin() && - (T.getArch() == Triple::aarch64 || T.getArch() == Triple::aarch64_32)) - SupportsCompactUnwindWithoutEHFrame = true; + // Disabled for now, since we need to emit EH Frames for stack unwinding in the JIT + // if (T.isOSDarwin() && + // (T.getArch() == Triple::aarch64 || T.getArch() == Triple::aarch64_32)) + // SupportsCompactUnwindWithoutEHFrame = true; if (T.isWatchABI()) OmitDwarfIfHaveCompactUnwind = true;