[PATCH] D158011: Make _LIBUNWIND_SUPPORT_FRAME_APIS not conditional on target architecure.

Sterling Augustine via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 15 11:50:19 PDT 2023


saugustine created this revision.
Herald added subscribers: steven.zhang, pengfei, kristof.beyls.
Herald added a project: All.
saugustine requested review of this revision.
Herald added projects: LLVM, libunwind.
Herald added subscribers: libcxx-commits, llvm-commits.
Herald added a reviewer: libunwind.

The functions this macro protects are stubs for libgcc-compatibility.
Today, libunwind as a drop-in replacement for libgcc_eh links on x86,
x86_64, and powerpc, but not aarch64, which doesn't really make
sense. As there is nothing architecture specific about these, they
should be provided everywhere or nowhere.

The target-specific protection goes all the way back to the original
code contribution in 312fcd0e1cf14482b2ae8eee8234541dcc3bc2c4 from
2013, so the original reason is lost to history, and probably not
relevant today.

It may make sense to make this a top-level configure option, or
possibly to get it on defined(__linux__) but either default has some
compatibility issues--they would either be available in unexpected
places, or not available in expected places. Just like with this
patch. Please advise.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D158011

Files:
  libunwind/src/config.h


Index: libunwind/src/config.h
===================================================================
--- libunwind/src/config.h
+++ libunwind/src/config.h
@@ -108,9 +108,7 @@
 #define _LIBUNWIND_BUILD_SJLJ_APIS
 #endif
 
-#if defined(__i386__) || defined(__x86_64__) || defined(__powerpc__)
 #define _LIBUNWIND_SUPPORT_FRAME_APIS
-#endif
 
 #if defined(__i386__) || defined(__x86_64__) || defined(__powerpc__) ||        \
     (!defined(__APPLE__) && defined(__arm__)) || defined(__aarch64__) ||       \


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D158011.550417.patch
Type: text/x-patch
Size: 501 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230815/c0c422c9/attachment.bin>


More information about the llvm-commits mailing list