[clang] [compiler-rt] [lldb] [llvm] Add ARMv8-M and ARMv8.1-M support for Darwin (PR #195184)
Doug Gregor via cfe-commits
cfe-commits at lists.llvm.org
Fri May 1 10:51:06 PDT 2026
================
@@ -2839,6 +2839,24 @@ Triple MachOObjectFile::getArchTriple(uint32_t CPUType, uint32_t CPUSubType,
if (ArchFlag)
*ArchFlag = "armv7s";
return Triple("armv7s-apple-darwin");
+ case MachO::CPU_SUBTYPE_ARM_V8M_BASE:
+ if (McpuDefault)
+ *McpuDefault = "cortex-m23";
+ if (ArchFlag)
+ *ArchFlag = "armv8m.base";
+ return Triple("thumbv8m-apple-darwin");
+ case MachO::CPU_SUBTYPE_ARM_V8M_MAIN:
+ if (McpuDefault)
+ *McpuDefault = "cortex-m23";
----------------
DougGregor wrote:
Both the [wikipedia page](https://en.wikipedia.org/wiki/ARM_Cortex-M#cite_note-ARMv8-M-Manual-31) and [ARM's page on the cortex-m23](https://www.arm.com/products/silicon-ip-cpu/cortex-m/cortex-m23) say it's ARMV8-M. Is there some other consideration here?
https://github.com/llvm/llvm-project/pull/195184
More information about the cfe-commits
mailing list