Index: lib/DebugInfo/PDB/CMakeLists.txt =================================================================== --- lib/DebugInfo/PDB/CMakeLists.txt +++ lib/DebugInfo/PDB/CMakeLists.txt @@ -6,7 +6,11 @@ if(LLVM_ENABLE_DIA_SDK) include_directories(${MSVC_DIA_SDK_DIR}/include) set(LIBPDB_LINK_FOLDERS "${MSVC_DIA_SDK_DIR}\\lib") - if (CMAKE_SIZEOF_VOID_P EQUAL 8) + if ("$ENV{VSCMD_ARG_TGT_ARCH}" STREQUAL "arm64") + set(LIBPDB_LINK_FOLDERS "${LIBPDB_LINK_FOLDERS}\\arm64") + elseif ("$ENV{VSCMD_ARG_TGT_ARCH}" STREQUAL "arm") + set(LIBPDB_LINK_FOLDERS "${LIBPDB_LINK_FOLDERS}\\arm") + elseif (CMAKE_SIZEOF_VOID_P EQUAL 8) set(LIBPDB_LINK_FOLDERS "${LIBPDB_LINK_FOLDERS}\\amd64") endif() file(TO_CMAKE_PATH "${LIBPDB_LINK_FOLDERS}\\diaguids.lib" LIBPDB_ADDITIONAL_LIBRARIES) Index: lib/Support/Windows/Signals.inc =================================================================== --- lib/Support/Windows/Signals.inc +++ lib/Support/Windows/Signals.inc @@ -539,7 +539,7 @@ #elif defined(_M_ARM64) || defined(_M_ARM) StackFrame.AddrPC.Offset = Context.Pc; StackFrame.AddrStack.Offset = Context.Sp; - StackFrame.AddrFrame.Offset = Context.Fp; + StackFrame.AddrFrame.Offset = Context.R11; #endif StackFrame.AddrPC.Mode = AddrModeFlat; StackFrame.AddrStack.Mode = AddrModeFlat; @@ -819,7 +819,7 @@ StackFrame.AddrPC.Mode = AddrModeFlat; StackFrame.AddrStack.Offset = ep->ContextRecord->Sp; StackFrame.AddrStack.Mode = AddrModeFlat; - StackFrame.AddrFrame.Offset = ep->ContextRecord->Fp; + StackFrame.AddrFrame.Offset = ep->ContextRecord->R11; StackFrame.AddrFrame.Mode = AddrModeFlat; #endif