Skip to content

Commit b014ab8

Browse files
authored
define UNW_AARCH64 aliases conditionally (#84591)
1 parent ea0b639 commit b014ab8

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

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

+1
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@
6767
#cmakedefine01 HAVE_SCHED_SETAFFINITY
6868
#cmakedefine HAVE_UNW_GET_SAVE_LOC
6969
#cmakedefine HAVE_UNW_GET_ACCESSORS
70+
#cmakedefine HAVE_UNW_AARCH64_X19
7071
#cmakedefine01 HAVE_XSWDEV
7172
#cmakedefine01 HAVE_XSW_USAGE
7273
#cmakedefine01 HAVE_PUBLIC_XSTATE_STRUCT

src/coreclr/pal/src/configure.cmake

+9
Original file line numberDiff line numberDiff line change
@@ -1032,6 +1032,15 @@ int main(int argc, char **argv)
10321032
check_symbol_exists(unw_get_save_loc libunwind.h HAVE_UNW_GET_SAVE_LOC)
10331033
check_symbol_exists(unw_get_accessors libunwind.h HAVE_UNW_GET_ACCESSORS)
10341034

1035+
check_cxx_source_compiles("
1036+
#include <libunwind.h>
1037+
1038+
int main(int argc, char **argv)
1039+
{
1040+
int flag = (int)UNW_AARCH64_X19;
1041+
return 0;
1042+
}" HAVE_UNW_AARCH64_X19)
1043+
10351044
if(NOT CLR_CMAKE_USE_SYSTEM_LIBUNWIND)
10361045
list(REMOVE_AT CMAKE_REQUIRED_INCLUDES 0 1)
10371046
endif()

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

+1-1
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(HOST_ARM64)
57+
#if defined(TARGET_OSX) && defined(HOST_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)