From d4bb48c03ce3af1356e76d6ca48720971e57b9b1 Mon Sep 17 00:00:00 2001
From: jeremyd2019 <github@jdrake.com>
Date: Fri, 8 Aug 2025 13:00:45 -0700
Subject: [PATCH] [LLVM][lit] add system-cygwin feature (#152780)

There are a few tests in clang that gate on system-windows but also
don't work on Cygwin, so add a system-cygwin feature for them to use.

(cherry picked from commit 37bcd937766d0bb151d4ee54d72d9cc289fee97b)
---
 llvm/utils/lit/lit/llvm/config.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/llvm/utils/lit/lit/llvm/config.py b/llvm/utils/lit/lit/llvm/config.py
index 649636d4bc..b04fb25f3c 100644
--- a/llvm/utils/lit/lit/llvm/config.py
+++ b/llvm/utils/lit/lit/llvm/config.py
@@ -107,6 +107,8 @@ class LLVMConfig(object):
             features.add("system-solaris")
         elif platform.system() == "OS/390":
             features.add("system-zos")
+        elif sys.platform == "cygwin":
+            features.add("system-cygwin")
 
         # Native compilation: host arch == default triple arch
         # Both of these values should probably be in every site config (e.g. as
-- 
2.51.0.windows.1

