Skip to content
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

Add support for ppc64le architecture #3259

Merged
merged 1 commit into from
Mar 11, 2025

Conversation

Jenkins-J
Copy link
Contributor

Allow rules_rust module to be used on the ppc64le architecture.

Copy link
Collaborator

@UebelAndre UebelAndre left a comment

Choose a reason for hiding this comment

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

Thanks! Just one question though

@@ -117,7 +117,7 @@ def get_host_triple(repository_ctx, abi = None):
# Detect the host's cpu architecture

supported_architectures = {
"linux": ["aarch64", "x86_64", "s390x"],
"linux": ["aarch64", "x86_64", "s390x", "powerpc64le"],
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is the host platform ever gonna be powerpc? I think the only changes you need are what was done in rust/platform/triple_mappings.bzl.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If I understand correctly, the host platform is the platform the bazel binary is executed on. When attempting to utilize rules_rust and executing bazel on a ppc64le host, I did receive the failure message from _validate_cpu_architecture, causing the build to fail. Marking it as supported here seems necessary to avoid failure in that case.

@UebelAndre
Copy link
Collaborator

@Jenkins-J Looks like this PR will need to be rebased and the crate_universe examples repinned.

@Jenkins-J
Copy link
Contributor Author

@UebelAndre I was able to rebase the PR. What is the recommended way to repin the crate_universe examples? I am not familiar with that process. Is there a specific bazel rule in the cargo_universe directory that I must run with CARGO_BAZEL_REPIN=1 set?

@UebelAndre
Copy link
Collaborator

@UebelAndre I was able to rebase the PR. What is the recommended way to repin the crate_universe examples? I am not familiar with that process. Is there a specific bazel rule in the cargo_universe directory that I must run with CARGO_BAZEL_REPIN=1 set?

@Jenkins-J you should be able to run this script and commit the results: //util/repin_all.sh

Verified

This commit was signed with the committer’s verified signature.
ljharb Jordan Harband
Allow rules_rust module to be used on the ppc64le
architecture.

Signed-off-by: James Jenkins <James.Jenkins@ibm.com>
@UebelAndre UebelAndre added this pull request to the merge queue Mar 11, 2025
Merged via the queue into bazelbuild:main with commit aa977b2 Mar 11, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants