[Lldb-commits] [lldb] 479b672 - [lldb] Pretend host architecture is arm64 on AS
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Tue Apr 13 18:57:28 PDT 2021
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
More information about the lldb-commits
mailing list