Skip to content

Conversation

@savannahostrowski
Copy link
Member

@savannahostrowski savannahostrowski commented Dec 8, 2025

This PR adds support for downloading platform-specific LLVM binaries (AMD64, ARM64) instead of using a single binary with emulation (see https://github.com/python/cpython-bin-deps/releases/tag/llvm-21.1.4.0 for release artifacts). Since this won't naturally trigger jit.yml, you can see a successful run here, including print statements to show that we are in fact downloading the correct binary 😄.


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'
arch = platform.machine()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we instead based this on %PreferredToolArchitecture% (will be x86, x64 or ARM64), and possibly update the Exec task in the build files to pass it through? It's set as a build-time variable ($(PreferredToolArchitecture)) but if it's overridden (from the current default, x86) then likely it's set as an environment variable.

This is the same setting we use for all "things that run during build", and is used by MSVC when selecting which version of its own LLVM to use.

(If I'm misunderstanding why we need to select the architecture here now and it's because of the target architecture, not the build machine architecture, then same suggested but use $(Platform) instead.)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure PreferredToolArchitecture would give us the right answer here - we need LLVM that can actually run on the build host, not LLVM that matches a tool preference. For example, if someone set PreferredToolArchitecture=x86 on an ARM64 machine, we'd still want ARM64 LLVM since that's what can execute natively. Does that make sense, or am I missing a scenario?

with:
python-version: '3.11'

# test comment to trigger JIT CI
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will remove later :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants