Skip to content

Commit

Permalink
Define common Android platforms.
Browse files Browse the repository at this point in the history
Users can use these by adding `--android_platforms=@rules_android//:armeabi-v7a` to their builds (replacing `@rules_android` with the name they use to import https://github.com/bazelbuild/rules_android).

This is work towards enabling platforms and toolchains for Android builds (bazelbuild/bazel#16285).

PiperOrigin-RevId: 499992246
Change-Id: If03f275cb8372cd18a7cd21a94f693ebcc3dd569
  • Loading branch information
A Googler authored and ahumesky committed Jan 6, 2023
1 parent d677e53 commit 502e83f
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions BUILD
Original file line number Diff line number Diff line change
@@ -1,4 +1,41 @@
load("@bazel_gazelle//:def.bzl", "gazelle")

package(default_visibility = ["//visibility:public"])

# gazelle:prefix github.com/bazelbuild/rules_android
gazelle(name = "gazelle")

# Common default platform definitions for use by Android projects.

platform(
name = "x86",
constraint_values = [
"@platforms//os:android",
"@platforms//cpu:x86_32",
],
)

platform(
name = "x86_64",
constraint_values = [
"@platforms//os:android",
"@platforms//cpu:x86_64",
],
)

platform(
name = "armeabi-v7a",
constraint_values = [
"@platforms//os:android",
"@platforms//cpu:armv7",
],
)

platform(
name = "arm64-v8a",
constraint_values =
[
"@platforms//cpu:arm64",
"@platforms//os:android",
],
)

0 comments on commit 502e83f

Please sign in to comment.