Skip to content

Commit 693a3c6

Browse files
authored
define UNW_AARCH64 aliases conditionally (#84874)
1 parent 12aaae4 commit 693a3c6

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

src/coreclr/pal/src/config.h.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@
6868
#cmakedefine01 HAVE_SCHED_SETAFFINITY
6969
#cmakedefine HAVE_UNW_GET_SAVE_LOC
7070
#cmakedefine HAVE_UNW_GET_ACCESSORS
71+
#cmakedefine HAVE_UNW_AARCH64_X19
7172
#cmakedefine01 HAVE_XSWDEV
7273
#cmakedefine01 HAVE_XSW_USAGE
7374
#cmakedefine01 HAVE_PUBLIC_XSTATE_STRUCT

src/coreclr/pal/src/configure.cmake

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1047,6 +1047,15 @@ int main(int argc, char **argv)
10471047
check_symbol_exists(unw_get_save_loc libunwind.h HAVE_UNW_GET_SAVE_LOC)
10481048
check_symbol_exists(unw_get_accessors libunwind.h HAVE_UNW_GET_ACCESSORS)
10491049

1050+
check_cxx_source_compiles("
1051+
#include <libunwind.h>
1052+
1053+
int main(int argc, char **argv)
1054+
{
1055+
int flag = (int)UNW_AARCH64_X19;
1056+
return 0;
1057+
}" HAVE_UNW_AARCH64_X19)
1058+
10501059
if(NOT CLR_CMAKE_USE_SYSTEM_LIBUNWIND)
10511060
list(REMOVE_AT CMAKE_REQUIRED_INCLUDES 0 1)
10521061
endif()

src/coreclr/pal/src/exception/seh-unwind.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ Module Name:
5454

5555
#endif // HOST_UNIX
5656

57-
#if defined(TARGET_OSX) && defined(TARGET_ARM64)
57+
#if defined(TARGET_OSX) && defined(TARGET_ARM64) && !defined(HAVE_UNW_AARCH64_X19)
5858
// MacOS uses ARM64 instead of AARCH64 to describe these registers
5959
// Create aliases to reuse more code
6060
enum

0 commit comments

Comments
 (0)