-
-
Notifications
You must be signed in to change notification settings - Fork 33.6k
GH-141362: Make get_externals handle fetching platform-specific release artifacts
#142405
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
GH-141362: Make get_externals handle fetching platform-specific release artifacts
#142405
Conversation
|
|
||
| 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() |
There was a problem hiding this comment.
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.)
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will remove later :D
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 😄.get_externalshandle fetching platform-specific release artifacts #141362