Author: Jonas Devlieghere Date: 2021-04-13T18:57:23-07:00 New Revision: 479b672ff9a9230dee37fad97413a88bc0ab362b
URL: https://github.com/llvm/llvm-project/commit/479b672ff9a9230dee37fad97413a88bc0ab362b DIFF: https://github.com/llvm/llvm-project/commit/479b672ff9a9230dee37fad97413a88bc0ab362b.diff LOG: [lldb] Pretend host architecture is arm64 on AS The arm64e architecture is a preview. On Apple Silicon, pretend the host architecture is arm64. Added: Modified: lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm Removed: ################################################################################ diff --git a/lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm b/lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm index 98607a1549ea6..72924515d8817 100644 --- a/lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm +++ b/lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm @@ -243,6 +243,12 @@ static void ParseOSVersion(llvm::VersionTuple &version, NSString *Key) { len = sizeof(is_64_bit_capable); ::sysctlbyname("hw.cpu64bit_capable", &is_64_bit_capable, &len, NULL, 0); + if (cputype == CPU_TYPE_ARM64 && cpusubtype == CPU_SUBTYPE_ARM64E) { + // The arm64e architecture is a preview. Pretend the host architecture + // is arm64. + cpusubtype = CPU_SUBTYPE_ARM64_ALL; + } + if (is_64_bit_capable) { if (cputype & CPU_ARCH_ABI64) { // We have a 64 bit kernel on a 64 bit system _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits