Skip to content

Commit 479b672

Browse files
committed
[lldb] Pretend host architecture is arm64 on AS
The arm64e architecture is a preview. On Apple Silicon, pretend the host architecture is arm64.
1 parent d5e962f commit 479b672

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,12 @@ static void ParseOSVersion(llvm::VersionTuple &version, NSString *Key) {
243243
len = sizeof(is_64_bit_capable);
244244
::sysctlbyname("hw.cpu64bit_capable", &is_64_bit_capable, &len, NULL, 0);
245245

246+
if (cputype == CPU_TYPE_ARM64 && cpusubtype == CPU_SUBTYPE_ARM64E) {
247+
// The arm64e architecture is a preview. Pretend the host architecture
248+
// is arm64.
249+
cpusubtype = CPU_SUBTYPE_ARM64_ALL;
250+
}
251+
246252
if (is_64_bit_capable) {
247253
if (cputype & CPU_ARCH_ABI64) {
248254
// We have a 64 bit kernel on a 64 bit system

0 commit comments

Comments
 (0)