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