================ @@ -52,6 +52,22 @@ std::string aarch64::getAArch64TargetCPU(const ArgList &Args, return "apple-m1"; } + if (Triple.getOS() == llvm::Triple::IOS) { + assert(!Triple.isSimulatorEnvironment() && "iossim should be mac-like"); + // iOS 26 only runs on apple-a12 and later CPUs. + if (!Triple.isOSVersionLT(26)) + return "apple-a12"; + } + + if (Triple.isWatchOS()) { + assert(!Triple.isSimulatorEnvironment() && "watchossim should be mac-like"); + // arm64_32/arm64e watchOS requires S4 before watchOS 26, S6 after. + if (Triple.getArch() == llvm::Triple::aarch64_32 || Triple.isArm64e()) + return Triple.isOSVersionLT(26) ? "apple-s4" : "apple-s6"; ---------------- ahmedbougacha wrote:
Yeah, that could be a sensible alternative, but I tried to keep it structured in a way that keeps each policy clearly delineated: in this case there are distinct reasons we end up with S6; the same applies later for the various ways we end up with A12. https://github.com/llvm/llvm-project/pull/152235 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits