Skip to content

Commit a81e0a8

Browse files
Update docs
1 parent 16cf550 commit a81e0a8

File tree

2 files changed

+18
-9
lines changed

2 files changed

+18
-9
lines changed

PCbuild/get_external.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ def fetch_zip(commit_hash, zip_dir, *, org='python', binary=False, verbose):
4646

4747
def fetch_release(tag, tarball_dir, *, org='python', verbose=False):
4848
arch = platform.machine()
49-
reporthook = print if verbose else None
49+
reporthook = None
50+
if verbose:
51+
reporthook = print
5052
tarball_dir.mkdir(parents=True, exist_ok=True)
5153

5254
arch_filename = f'{tag}-{arch}.tar.xz'

Tools/jit/jit_infra.md

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,28 @@ When we update LLVM, we need to also update the LLVM release artifact for Window
88

99
To update the LLVM release artifact for Windows builds, follow these steps:
1010
1. Go to the [LLVM releases page](https://github.com/llvm/llvm-project/releases).
11-
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`).
12-
1. Extract and repackage the tarball with the correct directory structure. For example:
11+
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`).
12+
1. Extract and repackage each tarball with the correct directory structure. For example:
1313
```bash
14+
# For x86_64 (AMD64)
1415
tar -xf clang+llvm-21.1.4-x86_64-pc-windows-msvc.tar.xz
1516
mv clang+llvm-21.1.4-x86_64-pc-windows-msvc llvm-21.1.4.0
16-
tar -cf - llvm-21.1.4.0 | pv | xz > llvm-21.1.4.0.tar.xz
17+
tar -cf - llvm-21.1.4.0 | pv | xz > llvm-21.1.4.0-AMD64.tar.xz
18+
rm -rf llvm-21.1.4.0
19+
20+
# For ARM64
21+
tar -xf clang+llvm-21.1.4-aarch64-pc-windows-msvc.tar.xz
22+
mv clang+llvm-21.1.4-aarch64-pc-windows-msvc llvm-21.1.4.0
23+
tar -cf - llvm-21.1.4.0 | pv | xz > llvm-21.1.4.0-ARM64.tar.xz
1724
```
18-
The tarball must contain a top-level directory named `llvm-{version}.0/`.
25+
Each tarball must contain a top-level directory named `llvm-{version}.0/`.
1926
1. Go to [cpython-bin-deps](https://github.com/python/cpython-bin-deps).
20-
1. Create a new release with the updated LLVM artifact.
27+
1. Create a new release with the LLVM artifacts.
2128
- Create a new tag to match the LLVM version (e.g. `llvm-21.1.4.0`).
22-
- Specify the release title (e.g. `LLVM 21.1.4 for x86_64 Windows`).
23-
- Upload the asset (you can leave all other fields the same).
29+
- Specify the release title (e.g. `LLVM 21.1.4`).
30+
- Upload both platform-specific assets to the same release.
2431

2532
### Other notes
2633
- 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`.
27-
- We don't need multiple release artifacts for each architecture because LLVM can cross-compile for different architectures on Windows; x86_64 is sufficient.
34+
- 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`).
2835
- 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.

0 commit comments

Comments
 (0)