From 16cf550d409f526050f7588a28f23e2aa3964caf Mon Sep 17 00:00:00 2001 From: Savannah Ostrowski Date: Sun, 7 Dec 2025 20:36:33 -0800 Subject: [PATCH 01/19] Add logic for downloading platform-specific tarball --- PCbuild/get_external.py | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/PCbuild/get_external.py b/PCbuild/get_external.py index edf14ce578bce6..a05e8452c207f5 100755 --- a/PCbuild/get_external.py +++ b/PCbuild/get_external.py @@ -3,6 +3,7 @@ import argparse import os import pathlib +import platform import sys import tarfile import time @@ -44,13 +45,24 @@ def fetch_zip(commit_hash, zip_dir, *, org='python', binary=False, verbose): def fetch_release(tag, tarball_dir, *, org='python', verbose=False): - url = f'https://github.com/{org}/cpython-bin-deps/releases/download/{tag}/{tag}.tar.xz' - reporthook = None - if verbose: - reporthook = print + arch = platform.machine() + reporthook = print if verbose else None tarball_dir.mkdir(parents=True, exist_ok=True) - output_path = tarball_dir / f'{tag}.tar.xz' - retrieve_with_retries(url, output_path, reporthook) + + arch_filename = f'{tag}-{arch}.tar.xz' + arch_url = f'https://github.com/{org}/cpython-bin-deps/releases/download/{tag}/{arch_filename}' + try: + output_path = tarball_dir / arch_filename + retrieve_with_retries(arch_url, output_path, reporthook) + return output_path + except OSError: + if verbose: + print(f'{arch_filename} not found, trying generic build...') + + generic_filename = f'{tag}.tar.xz' + generic_url = f'https://github.com/{org}/cpython-bin-deps/releases/download/{tag}/{generic_filename}' + output_path = tarball_dir / generic_filename + retrieve_with_retries(generic_url, output_path, reporthook) return output_path From a81e0a82c8d6a4f53f4633f9cdc1a075667af0dc Mon Sep 17 00:00:00 2001 From: Savannah Ostrowski Date: Sun, 7 Dec 2025 20:55:58 -0800 Subject: [PATCH 02/19] Update docs --- PCbuild/get_external.py | 4 +++- Tools/jit/jit_infra.md | 23 +++++++++++++++-------- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/PCbuild/get_external.py b/PCbuild/get_external.py index a05e8452c207f5..0664f01e4561fd 100755 --- a/PCbuild/get_external.py +++ b/PCbuild/get_external.py @@ -46,7 +46,9 @@ def fetch_zip(commit_hash, zip_dir, *, org='python', binary=False, verbose): def fetch_release(tag, tarball_dir, *, org='python', verbose=False): arch = platform.machine() - reporthook = print if verbose else None + reporthook = None + if verbose: + reporthook = print tarball_dir.mkdir(parents=True, exist_ok=True) arch_filename = f'{tag}-{arch}.tar.xz' diff --git a/Tools/jit/jit_infra.md b/Tools/jit/jit_infra.md index 1a954755611d19..0f54d05c9205ef 100644 --- a/Tools/jit/jit_infra.md +++ b/Tools/jit/jit_infra.md @@ -8,21 +8,28 @@ When we update LLVM, we need to also update the LLVM release artifact for Window To update the LLVM release artifact for Windows builds, follow these steps: 1. Go to the [LLVM releases page](https://github.com/llvm/llvm-project/releases). -1. Download x86_64 Windows artifact for the desired LLVM version (e.g. `clang+llvm-21.1.4-x86_64-pc-windows-msvc.tar.xz`). -1. Extract and repackage the tarball with the correct directory structure. For example: +1. Download Windows artifacts for the desired LLVM version (e.g. `clang+llvm-21.1.4-x86_64-pc-windows-msvc.tar.xz` and `clang+llvm-21.1.4-aarch64-pc-windows-msvc.tar.xz`). +1. Extract and repackage each tarball with the correct directory structure. For example: ```bash + # For x86_64 (AMD64) tar -xf clang+llvm-21.1.4-x86_64-pc-windows-msvc.tar.xz mv clang+llvm-21.1.4-x86_64-pc-windows-msvc llvm-21.1.4.0 - tar -cf - llvm-21.1.4.0 | pv | xz > llvm-21.1.4.0.tar.xz + tar -cf - llvm-21.1.4.0 | pv | xz > llvm-21.1.4.0-AMD64.tar.xz + rm -rf llvm-21.1.4.0 + + # For ARM64 + tar -xf clang+llvm-21.1.4-aarch64-pc-windows-msvc.tar.xz + mv clang+llvm-21.1.4-aarch64-pc-windows-msvc llvm-21.1.4.0 + tar -cf - llvm-21.1.4.0 | pv | xz > llvm-21.1.4.0-ARM64.tar.xz ``` - The tarball must contain a top-level directory named `llvm-{version}.0/`. + Each tarball must contain a top-level directory named `llvm-{version}.0/`. 1. Go to [cpython-bin-deps](https://github.com/python/cpython-bin-deps). -1. Create a new release with the updated LLVM artifact. +1. Create a new release with the LLVM artifacts. - Create a new tag to match the LLVM version (e.g. `llvm-21.1.4.0`). - - Specify the release title (e.g. `LLVM 21.1.4 for x86_64 Windows`). - - Upload the asset (you can leave all other fields the same). + - Specify the release title (e.g. `LLVM 21.1.4`). + - Upload both platform-specific assets to the same release. ### Other notes - You must make sure that the name of the artifact matches exactly what is expected in `Tools/jit/_llvm.py` and `PCbuild/get_externals.py`. -- We don't need multiple release artifacts for each architecture because LLVM can cross-compile for different architectures on Windows; x86_64 is sufficient. +- The artifact filename must include the architecture suffix (e.g. `llvm-21.1.4.0-AMD64.tar.xz`, `llvm-21.1.4.0-ARM64.tar.xz`). For backwards compatibility with older CPython branches, you can also upload a copy without the suffix (`llvm-21.1.4.0.tar.xz`). - You must have permissions to create releases in the `cpython-bin-deps` repository. If you don't have permissions, you should contact one of the organization admins. \ No newline at end of file From 97ca11750f7040a3c289b3a4b89f8bce5114cd01 Mon Sep 17 00:00:00 2001 From: Savannah Ostrowski Date: Sun, 7 Dec 2025 20:58:10 -0800 Subject: [PATCH 03/19] Test windows --- .github/workflows/jit.yml | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/jit.yml b/.github/workflows/jit.yml index 62325250bd368e..dfea8093b160bb 100644 --- a/.github/workflows/jit.yml +++ b/.github/workflows/jit.yml @@ -60,10 +60,10 @@ jobs: - i686-pc-windows-msvc/msvc - x86_64-pc-windows-msvc/msvc - aarch64-pc-windows-msvc/msvc - - x86_64-apple-darwin/clang - - aarch64-apple-darwin/clang - - x86_64-unknown-linux-gnu/gcc - - aarch64-unknown-linux-gnu/gcc + # - x86_64-apple-darwin/clang + # - aarch64-apple-darwin/clang + # - x86_64-unknown-linux-gnu/gcc + # - aarch64-unknown-linux-gnu/gcc debug: - true - false @@ -79,18 +79,18 @@ jobs: - target: aarch64-pc-windows-msvc/msvc architecture: ARM64 runner: windows-11-arm - - target: x86_64-apple-darwin/clang - architecture: x86_64 - runner: macos-15-intel - - target: aarch64-apple-darwin/clang - architecture: aarch64 - runner: macos-14 - - target: x86_64-unknown-linux-gnu/gcc - architecture: x86_64 - runner: ubuntu-24.04 - - target: aarch64-unknown-linux-gnu/gcc - architecture: aarch64 - runner: ubuntu-24.04-arm + # - target: x86_64-apple-darwin/clang + # architecture: x86_64 + # runner: macos-15-intel + # - target: aarch64-apple-darwin/clang + # architecture: aarch64 + # runner: macos-14 + # - target: x86_64-unknown-linux-gnu/gcc + # architecture: x86_64 + # runner: ubuntu-24.04 + # - target: aarch64-unknown-linux-gnu/gcc + # architecture: aarch64 + # runner: ubuntu-24.04-arm steps: - uses: actions/checkout@v4 with: From ff270de47008333c47f0aa5e002b8bdfba84d945 Mon Sep 17 00:00:00 2001 From: Savannah Ostrowski Date: Sun, 7 Dec 2025 21:13:36 -0800 Subject: [PATCH 04/19] Handle i686 --- PCbuild/get_external.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/PCbuild/get_external.py b/PCbuild/get_external.py index 0664f01e4561fd..93dcb78c6774f5 100755 --- a/PCbuild/get_external.py +++ b/PCbuild/get_external.py @@ -46,6 +46,9 @@ def fetch_zip(commit_hash, zip_dir, *, org='python', binary=False, verbose): def fetch_release(tag, tarball_dir, *, org='python', verbose=False): arch = platform.machine() + # i686 (32-bit) builds can use x64 LLVM for cross-compilation + if arch == 'x86': + arch = 'AMD64' reporthook = None if verbose: reporthook = print From 345b71f3abbfbfdb19d16009200fc03fe74a6ee8 Mon Sep 17 00:00:00 2001 From: Savannah Ostrowski Date: Sun, 7 Dec 2025 21:13:54 -0800 Subject: [PATCH 05/19] Temp remove dep on interpreter job --- .github/workflows/jit.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/jit.yml b/.github/workflows/jit.yml index dfea8093b160bb..1fda5fe4c964d9 100644 --- a/.github/workflows/jit.yml +++ b/.github/workflows/jit.yml @@ -50,7 +50,7 @@ jobs: ./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3 jit: name: ${{ matrix.target }} (${{ matrix.debug && 'Debug' || 'Release' }}) - needs: interpreter + # needs: interpreter runs-on: ${{ matrix.runner }} timeout-minutes: 90 strategy: From 0fac493ca92083f51d73404cb293bad7c436a994 Mon Sep 17 00:00:00 2001 From: Savannah Ostrowski Date: Sun, 7 Dec 2025 21:17:37 -0800 Subject: [PATCH 06/19] Fix filter --- PCbuild/get_external.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PCbuild/get_external.py b/PCbuild/get_external.py index 93dcb78c6774f5..2f37ebe9e156a1 100755 --- a/PCbuild/get_external.py +++ b/PCbuild/get_external.py @@ -74,7 +74,7 @@ def fetch_release(tag, tarball_dir, *, org='python', verbose=False): def extract_tarball(externals_dir, tarball_path, tag): output_path = externals_dir / tag with tarfile.open(tarball_path) as tf: - tf.extractall(os.fspath(externals_dir)) + tf.extractall(os.fspath(externals_dir), filter='data') return output_path From 78602bfca7af43baea6e77adcfbe27372416a84f Mon Sep 17 00:00:00 2001 From: Savannah Ostrowski Date: Sun, 7 Dec 2025 21:17:49 -0800 Subject: [PATCH 07/19] Add debug --- PCbuild/get_external.py | 1 + 1 file changed, 1 insertion(+) diff --git a/PCbuild/get_external.py b/PCbuild/get_external.py index 2f37ebe9e156a1..33622c0b9175fb 100755 --- a/PCbuild/get_external.py +++ b/PCbuild/get_external.py @@ -57,6 +57,7 @@ def fetch_release(tag, tarball_dir, *, org='python', verbose=False): arch_filename = f'{tag}-{arch}.tar.xz' arch_url = f'https://github.com/{org}/cpython-bin-deps/releases/download/{tag}/{arch_filename}' try: + print(f'Downloading {arch_url}') output_path = tarball_dir / arch_filename retrieve_with_retries(arch_url, output_path, reporthook) return output_path From 4944126428ccdb47207f9d3366fc81f40404e1e7 Mon Sep 17 00:00:00 2001 From: Savannah Ostrowski Date: Sun, 7 Dec 2025 21:33:20 -0800 Subject: [PATCH 08/19] Undo debugging --- .github/workflows/jit.yml | 34 +++++++++++++++++----------------- PCbuild/get_external.py | 1 - 2 files changed, 17 insertions(+), 18 deletions(-) diff --git a/.github/workflows/jit.yml b/.github/workflows/jit.yml index 1fda5fe4c964d9..62325250bd368e 100644 --- a/.github/workflows/jit.yml +++ b/.github/workflows/jit.yml @@ -50,7 +50,7 @@ jobs: ./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3 jit: name: ${{ matrix.target }} (${{ matrix.debug && 'Debug' || 'Release' }}) - # needs: interpreter + needs: interpreter runs-on: ${{ matrix.runner }} timeout-minutes: 90 strategy: @@ -60,10 +60,10 @@ jobs: - i686-pc-windows-msvc/msvc - x86_64-pc-windows-msvc/msvc - aarch64-pc-windows-msvc/msvc - # - x86_64-apple-darwin/clang - # - aarch64-apple-darwin/clang - # - x86_64-unknown-linux-gnu/gcc - # - aarch64-unknown-linux-gnu/gcc + - x86_64-apple-darwin/clang + - aarch64-apple-darwin/clang + - x86_64-unknown-linux-gnu/gcc + - aarch64-unknown-linux-gnu/gcc debug: - true - false @@ -79,18 +79,18 @@ jobs: - target: aarch64-pc-windows-msvc/msvc architecture: ARM64 runner: windows-11-arm - # - target: x86_64-apple-darwin/clang - # architecture: x86_64 - # runner: macos-15-intel - # - target: aarch64-apple-darwin/clang - # architecture: aarch64 - # runner: macos-14 - # - target: x86_64-unknown-linux-gnu/gcc - # architecture: x86_64 - # runner: ubuntu-24.04 - # - target: aarch64-unknown-linux-gnu/gcc - # architecture: aarch64 - # runner: ubuntu-24.04-arm + - target: x86_64-apple-darwin/clang + architecture: x86_64 + runner: macos-15-intel + - target: aarch64-apple-darwin/clang + architecture: aarch64 + runner: macos-14 + - target: x86_64-unknown-linux-gnu/gcc + architecture: x86_64 + runner: ubuntu-24.04 + - target: aarch64-unknown-linux-gnu/gcc + architecture: aarch64 + runner: ubuntu-24.04-arm steps: - uses: actions/checkout@v4 with: diff --git a/PCbuild/get_external.py b/PCbuild/get_external.py index 33622c0b9175fb..2f37ebe9e156a1 100755 --- a/PCbuild/get_external.py +++ b/PCbuild/get_external.py @@ -57,7 +57,6 @@ def fetch_release(tag, tarball_dir, *, org='python', verbose=False): arch_filename = f'{tag}-{arch}.tar.xz' arch_url = f'https://github.com/{org}/cpython-bin-deps/releases/download/{tag}/{arch_filename}' try: - print(f'Downloading {arch_url}') output_path = tarball_dir / arch_filename retrieve_with_retries(arch_url, output_path, reporthook) return output_path From db8b2a48140e8b6f7f283ed86b35c88f53038301 Mon Sep 17 00:00:00 2001 From: Savannah Ostrowski Date: Sun, 7 Dec 2025 21:39:05 -0800 Subject: [PATCH 09/19] Clean up docs --- Tools/jit/jit_infra.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tools/jit/jit_infra.md b/Tools/jit/jit_infra.md index 0f54d05c9205ef..ff73f907b4b33b 100644 --- a/Tools/jit/jit_infra.md +++ b/Tools/jit/jit_infra.md @@ -31,5 +31,5 @@ To update the LLVM release artifact for Windows builds, follow these steps: ### Other notes - You must make sure that the name of the artifact matches exactly what is expected in `Tools/jit/_llvm.py` and `PCbuild/get_externals.py`. -- The artifact filename must include the architecture suffix (e.g. `llvm-21.1.4.0-AMD64.tar.xz`, `llvm-21.1.4.0-ARM64.tar.xz`). For backwards compatibility with older CPython branches, you can also upload a copy without the suffix (`llvm-21.1.4.0.tar.xz`). +- The artifact filename must include the architecture suffix (e.g. `llvm-21.1.4.0-AMD64.tar.xz`, `llvm-21.1.4.0-ARM64.tar.xz`). - You must have permissions to create releases in the `cpython-bin-deps` repository. If you don't have permissions, you should contact one of the organization admins. \ No newline at end of file From 46c9cd022fb7ae387c99470caabad935951e5703 Mon Sep 17 00:00:00 2001 From: Savannah Ostrowski Date: Sun, 7 Dec 2025 21:57:30 -0800 Subject: [PATCH 10/19] Update generic binary message --- PCbuild/get_external.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PCbuild/get_external.py b/PCbuild/get_external.py index 2f37ebe9e156a1..b3ec75fdb54da6 100755 --- a/PCbuild/get_external.py +++ b/PCbuild/get_external.py @@ -62,7 +62,7 @@ def fetch_release(tag, tarball_dir, *, org='python', verbose=False): return output_path except OSError: if verbose: - print(f'{arch_filename} not found, trying generic build...') + print(f'{arch_filename} not found, trying generic binary...') generic_filename = f'{tag}.tar.xz' generic_url = f'https://github.com/{org}/cpython-bin-deps/releases/download/{tag}/{generic_filename}' From 8f6d84a53a5f5ff45068ccd8c0fabf97f6a7b8d1 Mon Sep 17 00:00:00 2001 From: Savannah Ostrowski Date: Mon, 8 Dec 2025 07:20:41 -0800 Subject: [PATCH 11/19] Address PR comment to use PreferredToolArchitecture --- .github/workflows/jit.yml | 1 + PCbuild/get_external.py | 9 +++++---- Tools/jit/jit_infra.md | 4 ++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/jit.yml b/.github/workflows/jit.yml index 62325250bd368e..e949f921622f60 100644 --- a/.github/workflows/jit.yml +++ b/.github/workflows/jit.yml @@ -99,6 +99,7 @@ jobs: with: python-version: '3.11' + # test comment to trigger JIT CI # PCbuild downloads LLVM automatically: - name: Windows if: runner.os == 'Windows' diff --git a/PCbuild/get_external.py b/PCbuild/get_external.py index b3ec75fdb54da6..c0bfdf2e39a9b6 100755 --- a/PCbuild/get_external.py +++ b/PCbuild/get_external.py @@ -45,10 +45,11 @@ def fetch_zip(commit_hash, zip_dir, *, org='python', binary=False, verbose): def fetch_release(tag, tarball_dir, *, org='python', verbose=False): - arch = platform.machine() - # i686 (32-bit) builds can use x64 LLVM for cross-compilation - if arch == 'x86': - arch = 'AMD64' + # Use PreferredToolArchitecture if set, otherwise fall back to platform.machine() + arch = os.environ.get('PreferredToolArchitecture') + if not arch: + arch = platform.machine() + arch = {'AMD64': 'x64', 'x86': 'x64'}.get(arch, arch) reporthook = None if verbose: reporthook = print diff --git a/Tools/jit/jit_infra.md b/Tools/jit/jit_infra.md index ff73f907b4b33b..0b851c67d65c83 100644 --- a/Tools/jit/jit_infra.md +++ b/Tools/jit/jit_infra.md @@ -14,7 +14,7 @@ To update the LLVM release artifact for Windows builds, follow these steps: # For x86_64 (AMD64) tar -xf clang+llvm-21.1.4-x86_64-pc-windows-msvc.tar.xz mv clang+llvm-21.1.4-x86_64-pc-windows-msvc llvm-21.1.4.0 - tar -cf - llvm-21.1.4.0 | pv | xz > llvm-21.1.4.0-AMD64.tar.xz + tar -cf - llvm-21.1.4.0 | pv | xz > llvm-21.1.4.0-x64.tar.xz rm -rf llvm-21.1.4.0 # For ARM64 @@ -31,5 +31,5 @@ To update the LLVM release artifact for Windows builds, follow these steps: ### Other notes - You must make sure that the name of the artifact matches exactly what is expected in `Tools/jit/_llvm.py` and `PCbuild/get_externals.py`. -- The artifact filename must include the architecture suffix (e.g. `llvm-21.1.4.0-AMD64.tar.xz`, `llvm-21.1.4.0-ARM64.tar.xz`). +- The artifact filename must include the architecture suffix (e.g. `llvm-21.1.4.0-x64.tar.xz`, `llvm-21.1.4.0-ARM64.tar.xz`). - You must have permissions to create releases in the `cpython-bin-deps` repository. If you don't have permissions, you should contact one of the organization admins. \ No newline at end of file From 4755b8d4541f7a8af45ab9382a1ca6d14aefbeb9 Mon Sep 17 00:00:00 2001 From: Savannah Ostrowski Date: Mon, 8 Dec 2025 07:30:12 -0800 Subject: [PATCH 12/19] Hm, undo? --- PCbuild/get_external.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/PCbuild/get_external.py b/PCbuild/get_external.py index c0bfdf2e39a9b6..5a16bda9faa795 100755 --- a/PCbuild/get_external.py +++ b/PCbuild/get_external.py @@ -45,10 +45,7 @@ def fetch_zip(commit_hash, zip_dir, *, org='python', binary=False, verbose): def fetch_release(tag, tarball_dir, *, org='python', verbose=False): - # Use PreferredToolArchitecture if set, otherwise fall back to platform.machine() - arch = os.environ.get('PreferredToolArchitecture') - if not arch: - arch = platform.machine() + arch = platform.machine() arch = {'AMD64': 'x64', 'x86': 'x64'}.get(arch, arch) reporthook = None if verbose: From 84b07ff19dcb8491d2b1985455d084dff841aef3 Mon Sep 17 00:00:00 2001 From: Savannah Ostrowski Date: Tue, 9 Dec 2025 12:52:48 -0800 Subject: [PATCH 13/19] Add PreferredToolArchitecture env var back --- PCbuild/get_external.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/PCbuild/get_external.py b/PCbuild/get_external.py index 5a16bda9faa795..de677f615df43f 100755 --- a/PCbuild/get_external.py +++ b/PCbuild/get_external.py @@ -45,8 +45,12 @@ def fetch_zip(commit_hash, zip_dir, *, org='python', binary=False, verbose): def fetch_release(tag, tarball_dir, *, org='python', verbose=False): - arch = platform.machine() - arch = {'AMD64': 'x64', 'x86': 'x64'}.get(arch, arch) + arch = os.environ.get('PreferredToolArchitecture') + if not arch: + machine = platform.machine() + arch = 'ARM64' if machine == 'ARM64' else 'AMD64' + elif arch in ('x86', 'x64'): + arch = 'AMD64' reporthook = None if verbose: reporthook = print From bca672a4ac720b89b6aa29c58254d639fa893177 Mon Sep 17 00:00:00 2001 From: Savannah Ostrowski Date: Tue, 9 Dec 2025 13:11:16 -0800 Subject: [PATCH 14/19] Update PCbuild/get_external.py Co-authored-by: Steve Dower --- PCbuild/get_external.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PCbuild/get_external.py b/PCbuild/get_external.py index de677f615df43f..27fbc311bbc1d6 100755 --- a/PCbuild/get_external.py +++ b/PCbuild/get_external.py @@ -49,7 +49,7 @@ def fetch_release(tag, tarball_dir, *, org='python', verbose=False): if not arch: machine = platform.machine() arch = 'ARM64' if machine == 'ARM64' else 'AMD64' - elif arch in ('x86', 'x64'): + elif arch.lower() in ('x86', 'x64'): arch = 'AMD64' reporthook = None if verbose: From 3652f0bbc622c44a70a0da542a561d83796a00f0 Mon Sep 17 00:00:00 2001 From: Savannah Ostrowski Date: Thu, 11 Dec 2025 09:21:09 -0800 Subject: [PATCH 15/19] Remove test comment --- .github/workflows/jit.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/jit.yml b/.github/workflows/jit.yml index e949f921622f60..62325250bd368e 100644 --- a/.github/workflows/jit.yml +++ b/.github/workflows/jit.yml @@ -99,7 +99,6 @@ jobs: with: python-version: '3.11' - # test comment to trigger JIT CI # PCbuild downloads LLVM automatically: - name: Windows if: runner.os == 'Windows' From d44665f197125b405070ac17ee0d3361729e1676 Mon Sep 17 00:00:00 2001 From: Savannah Ostrowski Date: Thu, 11 Dec 2025 15:09:08 -0800 Subject: [PATCH 16/19] Add documentation --- Tools/jit/README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Tools/jit/README.md b/Tools/jit/README.md index c70c0c47d94ad2..06a6c812ec6cd3 100644 --- a/Tools/jit/README.md +++ b/Tools/jit/README.md @@ -43,6 +43,15 @@ Homebrew won't add any of the tools to your `$PATH`. That's okay; the build scri LLVM is downloaded automatically (along with other external binary dependencies) by `PCbuild\build.bat`. +By default, the architecture of the LLVM tools is auto-detected based on the host machine. To override this, set the `PreferredToolArchitecture` environment variable before building: + +```sh +set PreferredToolArchitecture=AMD64 +PCbuild\build.bat --experimental-jit +``` + +Valid values are `AMD64`, `ARM64`, `x64`, and `x86` (the latter two are mapped to `AMD64`). + Otherwise, you can install LLVM 21 [by searching for it on LLVM's GitHub releases page](https://github.com/llvm/llvm-project/releases?q=21), clicking on "Assets", downloading the appropriate Windows installer for your platform (likely the file ending with `-win64.exe`), and running it. **When installing, be sure to select the option labeled "Add LLVM to the system PATH".** Alternatively, you can use [chocolatey](https://chocolatey.org): From 749dc1abd6801e657797607352fd1562a5689d8b Mon Sep 17 00:00:00 2001 From: Savannah Ostrowski Date: Thu, 11 Dec 2025 15:09:57 -0800 Subject: [PATCH 17/19] More docs --- Tools/jit/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tools/jit/README.md b/Tools/jit/README.md index 06a6c812ec6cd3..5afd8aa8266fe6 100644 --- a/Tools/jit/README.md +++ b/Tools/jit/README.md @@ -50,7 +50,7 @@ set PreferredToolArchitecture=AMD64 PCbuild\build.bat --experimental-jit ``` -Valid values are `AMD64`, `ARM64`, `x64`, and `x86` (the latter two are mapped to `AMD64`). +Valid values are `AMD64` (or `x64`/`x86`) and `ARM64`. Otherwise, you can install LLVM 21 [by searching for it on LLVM's GitHub releases page](https://github.com/llvm/llvm-project/releases?q=21), clicking on "Assets", downloading the appropriate Windows installer for your platform (likely the file ending with `-win64.exe`), and running it. **When installing, be sure to select the option labeled "Add LLVM to the system PATH".** From bcfec3f6b3cc7d2163a7ac6bbf3b1e9848b3180f Mon Sep 17 00:00:00 2001 From: Savannah Ostrowski Date: Thu, 11 Dec 2025 15:11:46 -0800 Subject: [PATCH 18/19] Remove extra space --- Tools/jit/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tools/jit/README.md b/Tools/jit/README.md index 5afd8aa8266fe6..11c42a01e07b55 100644 --- a/Tools/jit/README.md +++ b/Tools/jit/README.md @@ -50,7 +50,7 @@ set PreferredToolArchitecture=AMD64 PCbuild\build.bat --experimental-jit ``` -Valid values are `AMD64` (or `x64`/`x86`) and `ARM64`. +Valid values are `AMD64` (or `x64`/`x86`) and `ARM64`. Otherwise, you can install LLVM 21 [by searching for it on LLVM's GitHub releases page](https://github.com/llvm/llvm-project/releases?q=21), clicking on "Assets", downloading the appropriate Windows installer for your platform (likely the file ending with `-win64.exe`), and running it. **When installing, be sure to select the option labeled "Add LLVM to the system PATH".** From e750eb00755848eae2360578d04092c18d4fc48f Mon Sep 17 00:00:00 2001 From: Savannah Ostrowski Date: Thu, 11 Dec 2025 15:27:29 -0800 Subject: [PATCH 19/19] Update Tools/jit/README.md Co-authored-by: Chris Eibl <138194463+chris-eibl@users.noreply.github.com> --- Tools/jit/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tools/jit/README.md b/Tools/jit/README.md index 11c42a01e07b55..8eadb3349ba6da 100644 --- a/Tools/jit/README.md +++ b/Tools/jit/README.md @@ -50,7 +50,7 @@ set PreferredToolArchitecture=AMD64 PCbuild\build.bat --experimental-jit ``` -Valid values are `AMD64` (or `x64`/`x86`) and `ARM64`. +Valid values are`x64`, `x86` and `ARM64`. Otherwise, you can install LLVM 21 [by searching for it on LLVM's GitHub releases page](https://github.com/llvm/llvm-project/releases?q=21), clicking on "Assets", downloading the appropriate Windows installer for your platform (likely the file ending with `-win64.exe`), and running it. **When installing, be sure to select the option labeled "Add LLVM to the system PATH".**