Implement the Unix build system refactor#24
Merged
Conversation
This reverts commit 2c08857.
emmatyping
marked this pull request as ready for review
March 2, 2026 09:30
emmatyping
marked this pull request as draft
March 2, 2026 09:45
emmatyping
marked this pull request as ready for review
March 3, 2026 02:22
Author
|
Okay this PR now fixes all CI jobs/platforms save for:
Windows build support also needs to be implemented, but that can be done in a follow up |
alex-semenyuk
approved these changes
Mar 7, 2026
Eclips4
self-requested a review
March 7, 2026 21:12
Eclips4
approved these changes
Mar 8, 2026
Eclips4
left a comment
Member
There was a problem hiding this comment.
Thank you Emma! I'll do a follow up to fix macos & iOS builds.
This was referenced Mar 8, 2026
Closed
Closed
RMPR
pushed a commit
to RMPR/cpython
that referenced
this pull request
Jul 7, 2026
This PR pretty much completely refactors the Rust build system. There are now two main ways Rust code is built: - The Rust triple is deduced based on the preprocessor run on Misc/platform_triplet.c - A cpython-build-helper crate is used to pass the proper link arguments for each configuration - The proper Rust toolchain is downloaded for iOS/Android/WASI for CI on those platforms - cpython-sys is updated significantly to ensure bindgen properly generates the bindings for each platform For shared builds, we build a crate into a cdylib and pass through link arguments from the makefile/configure and the linker executable so that the final link will match what is done for C programs. For static builds, a cpython-rust-staticlib crate is a built which depends on and re-exports the module initializers for each crate. This ensures there aren't duplicated Rust stdlib/core symbols. Fixes Rust-for-CPython#23
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR refactors the build system as described in #23.
Platforms working:
iOS seems to have some weirdness going on with finding the right sysroot I think, but I don't have a system to test it on at the moment.
Portions of this PR were made with Claude.