[libcxx-commits] [PATCH] D134969: [libunwind] Fix compile error with CROSS_UNWINDING

Florian Mayer via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Sep 30 09:57:14 PDT 2022


fmayer updated this revision to Diff 464310.
fmayer added a comment.

format


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D134969/new/

https://reviews.llvm.org/D134969

Files:
  libunwind/src/DwarfInstructions.hpp


Index: libunwind/src/DwarfInstructions.hpp
===================================================================
--- libunwind/src/DwarfInstructions.hpp
+++ libunwind/src/DwarfInstructions.hpp
@@ -202,7 +202,10 @@
       pint_t cfa = getCFA(addressSpace, prolog, registers);
 
       (void)stage2;
-#if defined(_LIBUNWIND_TARGET_AARCH64)
+      // __unw_step_stage2 is not used for cross unwinding, so we use
+      // __aarch64__ rather than LIBUNWIND_TARGET_AARCH64 to make sure we are
+      // building for AArch64 natively.
+#if defined(__aarch64__)
       if (stage2 && cieInfo.mteTaggedFrame) {
         pint_t sp = registers.getSP();
         pint_t p = sp;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D134969.464310.patch
Type: text/x-patch
Size: 664 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220930/d07966ae/attachment.bin>


More information about the libcxx-commits mailing list