[clang] [Clang] [Driver] add a Cygwin ToolChain (PR #135691)

Fangrui Song via cfe-commits cfe-commits at lists.llvm.org
Tue May 6 22:31:17 PDT 2025


================
@@ -2632,6 +2632,27 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes(
     return;
   }
 
+  if (TargetTriple.isWindowsCygwinEnvironment()) {
+    static const char *const CygwinX86Triples[] = {"i686-pc-cygwin",
+                                                   "i686-pc-msys"};
+    static const char *const CygwinX86_64Triples[] = {"x86_64-pc-cygwin",
+                                                      "x86_64-pc-msys"};
+    LibDirs.push_back("/lib");
+    switch (TargetTriple.getArch()) {
+    case llvm::Triple::x86_64:
+      TripleAliases.append(begin(CygwinX86_64Triples),
----------------
MaskRay wrote:

`TripleAliases.append({...})` and remove the array above

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


More information about the cfe-commits mailing list