[llvm-branch-commits] [llvm] release/23.x: [llvm][utils] Correct release package links for Windows (#215770) (PR #216057)

via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Aug 13 07:09:59 PDT 2026


https://github.com/llvmbot created https://github.com/llvm/llvm-project/pull/216057

Backport c076218f6e558f0d279243aadfbe269762774053

Requested by: @DavidSpickett

>From e113a459e0e98a920fb14bf3efcf2560b4cfabdf Mon Sep 17 00:00:00 2001
From: David Spickett <david.spickett at arm.com>
Date: Thu, 13 Aug 2026 14:49:02 +0100
Subject: [PATCH] [llvm][utils] Correct release package links for Windows
 (#215770)

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

(cherry picked from commit c076218f6e558f0d279243aadfbe269762774053)
---
 llvm/utils/release/github-upload-release.py | 65 +++++++++++++++------
 1 file changed, 48 insertions(+), 17 deletions(-)

diff --git a/llvm/utils/release/github-upload-release.py b/llvm/utils/release/github-upload-release.py
index 7b329cf96ab1a..212fbfa085cd2 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,35 +110,51 @@
             "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.msi.sig",
+            ),
         ),
         (
             "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",
             ),
         ),
     ),
 )
 
 
+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.
+    if "-rc" in release:
+        version, rc = release.split("-")
+        major_version = version.split(".")[0]
+        rc_number = rc.replace("rc", "")
+        release = f"{major_version}.0.0.{rc_number}"
+
+    return release
+
+
 def generate_download_links(release):
     base_url = (
         f"https://github.com/llvm/llvm-project/releases/download/llvmorg-{release}/"
@@ -148,7 +165,13 @@ def generate_download_links(release):
         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=windows_release_version(release)
+                )
+                for f in files
+            ]
             markdown_line += format_string.format(*files)
             markdown_line += " -->"
             markdown_lines.append(markdown_line)
@@ -184,7 +207,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`.
@@ -245,7 +268,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_version),
+                        )
+                        for f in files
+                    ]
+                )
                 print("  Files required:", files)
                 if files.issubset(release_assets):
                     print("  All files present, revealing link line.")



More information about the llvm-branch-commits mailing list