[clang] [clang][driver][darwin] DarwinSDKInfo doesn't match sufficiently modified triples, doesn't warn for unsupported architectures (PR #204061)

Ian Anderson via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 15 23:23:16 PDT 2026


================
@@ -265,3 +345,67 @@ clang::parseDarwinSDKInfo(llvm::vfs::FileSystem &VFS, StringRef SDKRootPath) {
   return llvm::make_error<llvm::StringError>("invalid SDKSettings.json",
                                              llvm::inconvertibleErrorCode());
 }
+
+DarwinSDKInfo::DarwinSDKInfo(llvm::Triple::OSType OS,
+                             llvm::Triple::EnvironmentType Environment,
+                             VersionTuple Version, StringRef DisplayName,
+                             VersionTuple MaximumDeploymentTarget)
+    : DarwinSDKInfo("", OS, Environment, Version, DisplayName,
+                    MaximumDeploymentTarget,
+                    legacyPlatformInfos(OS, Environment)) {}
+
+static DarwinSDKInfo::PlatformInfoStorageType::const_iterator
+findPlatformInfo(const DarwinSDKInfo::PlatformInfoStorageType &PlatformInfos,
+                 const llvm::Triple &Triple) {
+  auto PlatformInfoIt = llvm::find_if(
+      PlatformInfos,
+      [&Triple](const DarwinSDKInfo::SDKPlatformInfo &PlatformInfo) {
+        const auto &Triples = PlatformInfo.getTriples();
+        return llvm::find(Triples, Triple) != Triples.end();
+      });
+
+  // The SDK specifies values for Xcode to use for the -target argument. It's
----------------
ian-twilightcoder wrote:

New code: arch/thumb matching

https://github.com/llvm/llvm-project/pull/204061


More information about the cfe-commits mailing list