#cmakedefine01 HAVE_SCHED_SETAFFINITY
#cmakedefine HAVE_UNW_GET_SAVE_LOC
#cmakedefine HAVE_UNW_GET_ACCESSORS
+#cmakedefine HAVE_UNW_AARCH64_X19
#cmakedefine01 HAVE_XSWDEV
#cmakedefine01 HAVE_XSW_USAGE
#cmakedefine01 HAVE_PUBLIC_XSTATE_STRUCT
check_symbol_exists(unw_get_save_loc libunwind.h HAVE_UNW_GET_SAVE_LOC)
check_symbol_exists(unw_get_accessors libunwind.h HAVE_UNW_GET_ACCESSORS)
+check_cxx_source_compiles("
+#include <libunwind.h>
+
+int main(int argc, char **argv)
+{
+ int flag = (int)UNW_AARCH64_X19;
+ return 0;
+}" HAVE_UNW_AARCH64_X19)
+
if(NOT CLR_CMAKE_USE_SYSTEM_LIBUNWIND)
list(REMOVE_AT CMAKE_REQUIRED_INCLUDES 0 1)
endif()
#endif // HOST_UNIX
-#if defined(TARGET_OSX) && defined(HOST_ARM64)
+#if defined(TARGET_OSX) && defined(HOST_ARM64) && !defined(HAVE_UNW_AARCH64_X19)
// MacOS uses ARM64 instead of AARCH64 to describe these registers
// Create aliases to reuse more code
enum