bazelbuild / bazelbuild/rules_android

Mappings Between Android Architectures and Bazel CPU names

Open
#45 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
203
Forks
95
PR merge metrics
No merged PRs in 30d

Description

Hi wonderful Bazelers,

I'd like to float an idea for making official something I find myself repeatedly rebuilding on top of platforms when I use it with the Android rules.

Android has its own names for CPU architectures that differ slightly from the Bazel CPU names over in https://github.com/bazelbuild/platforms. In order to use libraries, including Google ones, like Firebase, or to otherwise build Android things in Starlark, you have to hardcode that mapping.

It'd be great if rules_android would could be the source of truth for that mapping at some point in the future! I know there's lots left to do before a v1 gets out, but I wanted to chime in that I think this is going to be a generally helpful feature more broadly than just being needed for the implementation of the starlark rules.

The mapping could look something like:
```Starlark
BAZEL_CPU_ANDROID_ARCH_PAIRS = (
("armv7", "armeabi-v7a"),
("arm64", "arm64-v8a"),
("x86_32", "x86"),
("x86_64", "x86_64"),
)
```

Happy to contribute of course--and would have made this a PR--except that I'm not sure quite how this repo is being managed wrt the starlark rules alpha branch.

Cheers!
Chris
(ex-Googler)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.