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

via cfe-commits cfe-commits at lists.llvm.org
Tue May 6 22:44:07 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),
----------------
jeremyd2019 wrote:

cool, I didn't know that worked.  I was following what all the others were doing.

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


More information about the cfe-commits mailing list