1# Common target platforms for Android Platform builds.
2#
3# Platforms represent distinct hardware environments:
4#
5#   - CPU architecture
6#   - Hardware capabilities
7#   - Firmware differences
8#
9# Platforms do NOT represent different software packages, that is the
10# reposibility of the top-level targets being built.
11#
12# These model after the arch and OS definitions in build/soong/android/arch.go.
13
14package(default_visibility = ["//visibility:public"])
15
16# Linux is the OS
17# for the Linux kernel plus the glibc runtime.
18platform(
19    name = "linux_x86",
20    constraint_values = [
21        "//build/bazel/platforms/arch:x86",
22        "//build/bazel/platforms/os:linux",
23    ],
24)
25
26platform(
27    name = "linux_x86_64",
28    constraint_values = [
29        "//build/bazel/platforms/arch:x86_64",
30        "//build/bazel/platforms/os:linux",
31    ],
32)
33
34# linux_bionic is the OS for the Linux kernel plus the Bionic libc runtime, but
35# without the rest of Android.
36platform(
37    name = "linux_bionic_arm64",
38    constraint_values = [
39        "//build/bazel/platforms/arch:arm64",
40        "//build/bazel/platforms/os:linux_bionic",
41    ],
42)
43
44platform(
45    name = "linux_bionic_x86_64",
46    constraint_values = [
47        "//build/bazel/platforms/arch:x86_64",
48        "//build/bazel/platforms/os:linux_bionic",
49    ],
50)
51
52# Darwin is the OS for MacOS host machines.
53platform(
54    name = "darwin_x86_64",
55    constraint_values = [
56        "//build/bazel/platforms/arch:x86_64",
57        "//build/bazel/platforms/os:osx",
58    ],
59)
60
61# Windows is the OS for Windows host machines.
62platform(
63    name = "windows_x86",
64    constraint_values = [
65        "//build/bazel/platforms/arch:x86",
66        "//build/bazel/platforms/os:windows",
67    ],
68)
69
70platform(
71    name = "windows_x86_64",
72    constraint_values = [
73        "//build/bazel/platforms/arch:x86_64",
74        "//build/bazel/platforms/os:windows",
75    ],
76)
77
78# Android is the OS for target devices that run all of Android, including the Linux kernel
79# and the Bionic libc runtime.
80platform(
81    name = "android_arm",
82    constraint_values = [
83        "//build/bazel/platforms/arch:arm",
84        "//build/bazel/platforms/os:android",
85    ],
86)
87
88platform(
89    name = "android_arm64",
90    constraint_values = [
91        "//build/bazel/platforms/arch:arm64",
92        "//build/bazel/platforms/os:android",
93    ],
94)
95
96platform(
97    name = "android_x86",
98    constraint_values = [
99        "//build/bazel/platforms/arch:x86",
100        "//build/bazel/platforms/os:android",
101    ],
102)
103
104platform(
105    name = "android_x86_64",
106    constraint_values = [
107        "//build/bazel/platforms/arch:x86_64",
108        "//build/bazel/platforms/os:android",
109    ],
110)
111