[Lldb-commits] [lldb] [lldb][windows] refactor the version check in @skipIfWindows (PR #172838)

David Spickett via lldb-commits lldb-commits at lists.llvm.org
Thu Dec 18 03:55:01 PST 2025


================
@@ -300,6 +301,25 @@ def getCompilerVersion():
     return "unknown"
 
 
+def getWindowsVersion():
+    """Returns a string that represents the Windows version.
+
+    The string is a concatenation of the following, eparated by a dot:
+      - The major version number.
+      - The build number.
+
+    Example:
+      - Windows 11 version 24H2 -> "10.26100"
+      - Windows 10 version 1809 -> "10.17763"
+    """
+    import sys
+
+    if sys.platform != "win32":
+        return "unknown"
+    windows_version = sys.getwindowsversion()
----------------
DavidSpickett wrote:

I was going to ask how this works for remote targets but I see that the same call was used before. So it works exactly as much as it did or did not previously.

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


More information about the lldb-commits mailing list