Skip to content

Conversation

@keith
Copy link
Member

@keith keith commented Apr 25, 2022

Reverts #1259

This fix was landed in bazel bazelbuild/bazel#15248 which makes this one outdated

If folks want this in the meantime they can apply this as a patch to rules_rust until they update bazel.

This might make it into 5.2 bazelbuild/bazel#15337

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.

Awesome! Thanks!

@UebelAndre UebelAndre merged commit c900e1c into bazelbuild:main Apr 25, 2022
@keith keith deleted the revert-1259-ks/add-workaround-for-arm-vs-armv7-android-issue branch April 25, 2022 17:13
@UebelAndre
Copy link
Collaborator

In case it helps anyone, the diff for the .patch file to restore this functionality is:

diff --git a/rust/platform/triple_mappings.bzl b/rust/platform/triple_mappings.bzl
index 50a94494..5f5be214 100644
--- a/rust/platform/triple_mappings.bzl
+++ b/rust/platform/triple_mappings.bzl
@@ -269,6 +269,13 @@ def triple_to_constraint_set(target_triple):
             "@rules_rust//rust/platform/os:unknown",
         ]

+    # Workaround for https://github.com/bazelbuild/bazel/issues/14982
+    if target_triple in ("armv7-linux-androideabi", "thumbv7neon-linux-androideabi"):
+        return [
+            "@platforms//cpu:arm",
+            "@platforms//os:android",
+        ]
+
     triple_struct = triple(target_triple)

     constraint_set = []

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.

2 participants