Merged
Conversation
Contributor
Author
|
Let me convert this to a draft for now and investigate a bit. There may be some extra steps to get it all working. |
2c4f4d9 to
5358192
Compare
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
maturin supports the architecture for cross-compilation, so add it. Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
5358192 to
72b3357
Compare
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.
maturin supports cross-compilation for the architecture, so start supporting it in Linux builds.
As part of the RISE Project, we are adding riscv64 support for Python modules by building and distributing binaries as part of the wheel_builder repository. However, recent versions of maturin can cross-compile modules itself, so it should be relatively seamless to have upstream (i.e. this project) build lintrunner for riscv64.
For the record, I've tested the build locally in a riscv64 container (using
quay.io/pypa/manylinux_2_39_riscv64:2025.11.24-1), but because that doesn't fully match the Actions workflow used by lintrunner, I had to invoke maturin withmaturin build --release --out dist --target riscv64gc-unknown-linux-gnu. It seems that specifying eitherriscv64orriscv64gcin the target list as-is fails to pick up the right rustc target, so we need to be explicit about the target for the riscv64 arch. To prepare for that, a commit is added beforehand to make the platform arch-target combos more explicit.