[llvm] [llvm][utils] Correct release package links for Windows (PR #215770)

David Spickett via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 12 05:29:17 PDT 2026


https://github.com/DavidSpickett updated https://github.com/llvm/llvm-project/pull/215770

>From 9a417d5dd94285901287b3722ac22ffb52118d27 Mon Sep 17 00:00:00 2001
From: David Spickett <david.spickett at arm.com>
Date: Wed, 12 Aug 2026 09:52:36 +0000
Subject: [PATCH 1/4] [llvm][utils] Correct release package links for Windows

The new Wix installer has a .msi extension instead of .exe.
I've not seen an installer for Windows on Arm or 32-bit x86,
but I'm assuming they follow the same format.

-LLVM-23.1.0-rc3-win64.[exe]
+LLVM-23.0.0.3-win64.[msi]

The change to Wix was done in https://github.com/llvm/llvm-project/pull/200734.

Wix does not allow versions with characters in them. Fixed
in the builds by https://github.com/llvm/llvm-project/pull/215030,
and I've done an equivalent in Python.

-clang+llvm-[23.1.0-rc3]-x86_64-pc-windows-msvc.tar.xz
+clang+llvm-[23.0.0.3]-x86_64-pc-windows-msvc.tar.xz
---
 llvm/utils/release/github-upload-release.py | 47 ++++++++++++++-------
 1 file changed, 32 insertions(+), 15 deletions(-)

diff --git a/llvm/utils/release/github-upload-release.py b/llvm/utils/release/github-upload-release.py
index 7b329cf96ab1a..dd7e05832afc2 100755
--- a/llvm/utils/release/github-upload-release.py
+++ b/llvm/utils/release/github-upload-release.py
@@ -44,7 +44,8 @@
 # * A format string for the line's content.
 # * A list of filenames to substitute into the format string. Before substitution into
 #   the format string, file names will have the base download URL prepended to
-#   them and 'release' replaced with the release version.
+#   them. 'release' is replaced with the release version and 'windows_release'
+#   is replaced with the Wix friendly variant of the release version.
 #
 # Between each set of links, an empty line will be added.
 #
@@ -109,29 +110,32 @@
             "WINDOWS_X64",
             "* Windows x64 (64-bit): [installer]({0}) ([signature]({1})), [xz archive]({2}) ([signature]({3})), [zstd archive]({4}) ([signature]({5}))",
             (
-                "LLVM-{release}-win64.exe",
-                "LLVM-{release}-win64.exe.jsonl",
-                "clang+llvm-{release}-x86_64-pc-windows-msvc.tar.xz",
-                "clang+llvm-{release}-x86_64-pc-windows-msvc.tar.xz.jsonl",
-                "clang+llvm-{release}-x86_64-pc-windows-msvc.tar.zst",
-                "clang+llvm-{release}-x86_64-pc-windows-msvc.tar.zst.jsonl",
+                "LLVM-{windows_release}-win64.msi",
+                "LLVM-{windows_release}-win64.msi.jsonl",
+                "clang+llvm-{windows_release}-x86_64-pc-windows-msvc.tar.xz",
+                "clang+llvm-{windows_release}-x86_64-pc-windows-msvc.tar.xz.jsonl",
+                "clang+llvm-{windows_release}-x86_64-pc-windows-msvc.tar.zst",
+                "clang+llvm-{windows_release}-x86_64-pc-windows-msvc.tar.zst.jsonl",
             ),
         ),
         (
             "WINDOWS_X86",
             "* Windows x86 (32-bit): [installer]({0}) ([signature]({1}))",
-            ("LLVM-{release}-win32.exe", "LLVM-{release}-win32.exe.sig"),
+            (
+                "LLVM-{windows_release}-win32.msi",
+                "LLVM-{windows_release}-win32.exe.msi",
+            ),
         ),
         (
             "WINDOWS_ARM64",
             "* Windows on Arm (ARM64): [installer]({0}) ([signature]({1})), [xz archive]({2}) ([signature]({3})), [zstd archive]({4}) ([signature]({5}))",
             (
-                "LLVM-{release}-woa64.exe",
-                "LLVM-{release}-woa64.exe.jsonl",
-                "clang+llvm-{release}-aarch64-pc-windows-msvc.tar.xz",
-                "clang+llvm-{release}-aarch64-pc-windows-msvc.tar.xz.jsonl",
-                "clang+llvm-{release}-aarch64-pc-windows-msvc.tar.zst",
-                "clang+llvm-{release}-aarch64-pc-windows-msvc.tar.zst.jsonl",
+                "LLVM-{windows_release}-woa64.msi",
+                "LLVM-{windows_release}-woa64.msi.jsonl",
+                "clang+llvm-{windows_release}-aarch64-pc-windows-msvc.tar.xz",
+                "clang+llvm-{windows_release}-aarch64-pc-windows-msvc.tar.xz.jsonl",
+                "clang+llvm-{windows_release}-aarch64-pc-windows-msvc.tar.zst",
+                "clang+llvm-{windows_release}-aarch64-pc-windows-msvc.tar.zst.jsonl",
             ),
         ),
     ),
@@ -144,11 +148,24 @@ def generate_download_links(release):
     )
     markdown_lines = []
 
+    # Windows installers use Wix which does not support version strings with
+    # characters. To work around this, "X.1.0-rcZ" is changed to "X.0.0.Z".
+    # Equivalent to what is done in .github/workflows/release-binaries.yml.
+    windows_release = release
+    if "-rc" in windows_release:
+        version, rc = windows_release.split("-")
+        major_version = version.split(".")[0]
+        rc_number = rc.replace("rc", "")
+        windows_release = f"{major_version}.0.0.{rc_number}"
+
     for section in release_links:
         for line in section:
             comment_tag, format_string, files = line
             markdown_line = f"<!-- {comment_tag} "
-            files = [base_url + f.format(release=release) for f in files]
+            files = [
+                base_url + f.format(release=release, windows_release=release)
+                for f in files
+            ]
             markdown_line += format_string.format(*files)
             markdown_line += " -->"
             markdown_lines.append(markdown_line)

>From a4d85e173cf54a64f9a5f44e7ead50fd0970bc65 Mon Sep 17 00:00:00 2001
From: David Spickett <david.spickett at arm.com>
Date: Wed, 12 Aug 2026 12:19:27 +0000
Subject: [PATCH 2/4] address review comments

---
 llvm/utils/release/github-upload-release.py | 35 +++++++++++++++------
 1 file changed, 25 insertions(+), 10 deletions(-)

diff --git a/llvm/utils/release/github-upload-release.py b/llvm/utils/release/github-upload-release.py
index dd7e05832afc2..6a4d77edcd9a5 100755
--- a/llvm/utils/release/github-upload-release.py
+++ b/llvm/utils/release/github-upload-release.py
@@ -123,7 +123,7 @@
             "* Windows x86 (32-bit): [installer]({0}) ([signature]({1}))",
             (
                 "LLVM-{windows_release}-win32.msi",
-                "LLVM-{windows_release}-win32.exe.msi",
+                "LLVM-{windows_release}-win32.msi.sig",
             ),
         ),
         (
@@ -142,12 +142,7 @@
 )
 
 
-def generate_download_links(release):
-    base_url = (
-        f"https://github.com/llvm/llvm-project/releases/download/llvmorg-{release}/"
-    )
-    markdown_lines = []
-
+def windows_release_version(release):
     # Windows installers use Wix which does not support version strings with
     # characters. To work around this, "X.1.0-rcZ" is changed to "X.0.0.Z".
     # Equivalent to what is done in .github/workflows/release-binaries.yml.
@@ -158,12 +153,24 @@ def generate_download_links(release):
         rc_number = rc.replace("rc", "")
         windows_release = f"{major_version}.0.0.{rc_number}"
 
+    return windows_release
+
+
+def generate_download_links(release):
+    base_url = (
+        f"https://github.com/llvm/llvm-project/releases/download/llvmorg-{release}/"
+    )
+    markdown_lines = []
+
     for section in release_links:
         for line in section:
             comment_tag, format_string, files = line
             markdown_line = f"<!-- {comment_tag} "
             files = [
-                base_url + f.format(release=release, windows_release=release)
+                base_url
+                + f.format(
+                    release=release, windows_release=windows_release_version(release)
+                )
                 for f in files
             ]
             markdown_line += format_string.format(*files)
@@ -201,7 +208,7 @@ def create_release(repo, release, tag=None, name=None, message=None):
 
 Each platform has binary release packages. The file name starts with either `LLVM-` or `clang+llvm-` and ends with the platform's name. For example, `LLVM-{release}-Linux-ARM64.tar.xz` contains LLVM binaries for Arm64 Linux. Binary archive packages may be available as `.tar.xz` or `.tar.zst` files. The `.tar.zst` files contain the same package contents, but use zstd compression.
 
-Except for Windows. Where `LLVM-*.exe` is an installer intended for using LLVM as a toolchain and the archive `clang+llvm-` contains the contents of the installer, plus libraries and tools not normally used in a toolchain. You most likely want the `LLVM-` installer, unless you are developing software which itself uses LLVM, in which case choose `clang+llvm-`.
+Except for Windows. Where `LLVM-*.msi` is an installer intended for using LLVM as a toolchain and the archive `clang+llvm-` contains the contents of the installer, plus libraries and tools not normally used in a toolchain. You most likely want the `LLVM-` installer, unless you are developing software which itself uses LLVM, in which case choose `clang+llvm-`.
 
 In addition, source archives are available:
 * To get all the `llvm-project` source code for this release, choose `llvm-project-{release}.src.tar.xz`.
@@ -262,7 +269,15 @@ def uncomment_download_links(repo, release_version):
                     continue
 
                 print(f'Found link line "{comment_tag}":')
-                files = set([f.format(release=release_version) for f in files])
+                files = set(
+                    [
+                        f.format(
+                            release=release_version,
+                            windows_release=windows_release_version(release),
+                        )
+                        for f in files
+                    ]
+                )
                 print("  Files required:", files)
                 if files.issubset(release_assets):
                     print("  All files present, revealing link line.")

>From 308f93f7c744c172d60d44d2eec00b4dad386e75 Mon Sep 17 00:00:00 2001
From: David Spickett <david.spickett at arm.com>
Date: Wed, 12 Aug 2026 12:27:09 +0000
Subject: [PATCH 3/4] do not need windows_ within function

---
 llvm/utils/release/github-upload-release.py | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/llvm/utils/release/github-upload-release.py b/llvm/utils/release/github-upload-release.py
index 6a4d77edcd9a5..3b387736a1e1e 100755
--- a/llvm/utils/release/github-upload-release.py
+++ b/llvm/utils/release/github-upload-release.py
@@ -146,14 +146,13 @@ def windows_release_version(release):
     # Windows installers use Wix which does not support version strings with
     # characters. To work around this, "X.1.0-rcZ" is changed to "X.0.0.Z".
     # Equivalent to what is done in .github/workflows/release-binaries.yml.
-    windows_release = release
-    if "-rc" in windows_release:
-        version, rc = windows_release.split("-")
+    if "-rc" in release:
+        version, rc = release.split("-")
         major_version = version.split(".")[0]
         rc_number = rc.replace("rc", "")
-        windows_release = f"{major_version}.0.0.{rc_number}"
+        release = f"{major_version}.0.0.{rc_number}"
 
-    return windows_release
+    return release
 
 
 def generate_download_links(release):

>From e5c9c63fba3b21534cfc6c92869cd2019b71f861 Mon Sep 17 00:00:00 2001
From: David Spickett <david.spickett at arm.com>
Date: Wed, 12 Aug 2026 12:28:53 +0000
Subject: [PATCH 4/4] release -> release_version

---
 llvm/utils/release/github-upload-release.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/llvm/utils/release/github-upload-release.py b/llvm/utils/release/github-upload-release.py
index 3b387736a1e1e..212fbfa085cd2 100755
--- a/llvm/utils/release/github-upload-release.py
+++ b/llvm/utils/release/github-upload-release.py
@@ -272,7 +272,7 @@ def uncomment_download_links(repo, release_version):
                     [
                         f.format(
                             release=release_version,
-                            windows_release=windows_release_version(release),
+                            windows_release=windows_release_version(release_version),
                         )
                         for f in files
                     ]



More information about the llvm-commits mailing list