Author: Un1q32 Date: 2025-01-21T13:16:19-08:00 New Revision: 5651544c3647910ddb9f65414b8181f2560b999c
URL: https://github.com/llvm/llvm-project/commit/5651544c3647910ddb9f65414b8181f2560b999c DIFF: https://github.com/llvm/llvm-project/commit/5651544c3647910ddb9f65414b8181f2560b999c.diff LOG: Make armv6 iOS by default instead of macOS when targeting Darwin (#117243) AFAIK the only publicly released armv6 devices that ran Darwin were the iPhone 2G, iPhone 3G, iPod touch 1, and the iPod touch 2, all of which were iOS devices. Added: Modified: clang/lib/Driver/ToolChains/Darwin.cpp clang/test/Driver/darwin-version.c Removed: ################################################################################ diff --git a/clang/lib/Driver/ToolChains/Darwin.cpp b/clang/lib/Driver/ToolChains/Darwin.cpp index 84ef8199de049c..55c55bad739347 100644 --- a/clang/lib/Driver/ToolChains/Darwin.cpp +++ b/clang/lib/Driver/ToolChains/Darwin.cpp @@ -2164,7 +2164,8 @@ inferDeploymentTargetFromArch(DerivedArgList &Args, const Darwin &Toolchain, StringRef MachOArchName = Toolchain.getMachOArchName(Args); if (MachOArchName == "arm64" || MachOArchName == "arm64e") OSTy = llvm::Triple::MacOSX; - else if (MachOArchName == "armv7" || MachOArchName == "armv7s") + else if (MachOArchName == "armv7" || MachOArchName == "armv7s" || + MachOArchName == "armv6") OSTy = llvm::Triple::IOS; else if (MachOArchName == "armv7k" || MachOArchName == "arm64_32") OSTy = llvm::Triple::WatchOS; diff --git a/clang/test/Driver/darwin-version.c b/clang/test/Driver/darwin-version.c index ff05d4c10c4877..a00bd832dc8028 100644 --- a/clang/test/Driver/darwin-version.c +++ b/clang/test/Driver/darwin-version.c @@ -1,6 +1,6 @@ // RUN: %clang -target armv6-apple-darwin9 -c %s -### 2>&1 | \ -// RUN: FileCheck --check-prefix=CHECK-VERSION-OSX %s -// CHECK-VERSION-OSX: "armv6k-apple-macosx10.5.0" +// RUN: FileCheck --check-prefix=CHECK-VERSION-IOS %s +// CHECK-VERSION-IOS: "armv6k-apple-ios5.0.0" // RUN: %clang -target armv6-apple-darwin9 -miphoneos-version-min=2.0 -c %s -### 2>&1 | \ // RUN: FileCheck --check-prefix=CHECK-VERSION-IOS2 %s // CHECK-VERSION-IOS2: "armv6k-apple-ios2.0.0" _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits