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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
|
// Copyright (C) 2020 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package {
// See: http://go/android-license-faq
// A large-scale-change added 'default_applicable_licenses' to import
// all of the 'license_kinds' from "art_license"
// to get the below license kinds:
// SPDX-license-identifier-Apache-2.0
default_applicable_licenses: ["art_license"],
}
soong_config_module_type_import {
from: "art/build/SoongConfig.bp",
module_types: [
"art_module_sdk",
"art_module_exports",
],
}
// Additional visibility to add to the prebuilt modules that are part of
// the snapshots of the ART sdk/module_exports to ensure that they are
// visible to each other.
prebuilt_visibility = [
// TODO(b/155921753): Restrict this when prebuilts are in their proper
// locations.
"//prebuilts:__subpackages__",
]
// The SDK for the art module apex.
art_module_sdk {
name: "art-module-sdk",
host_supported: true,
// Enable if SOONG_CONFIG_art_module_source_build is true.
enabled: false,
soong_config_variables: {
source_build: {
enabled: true,
},
},
prebuilt_visibility: prebuilt_visibility,
target: {
// Both android and host linux but not windows or darwin.
linux: {
native_header_libs: [
"jni_headers",
"libartpalette-headers",
"libnativehelper_header_only",
"libopenjdkjvmti_headers",
],
native_shared_libs: [
"libandroidio",
"libdexfile",
"libnativebridge",
"libnativehelper",
"libnativeloader",
"libsigchain",
],
native_static_libs: [
"libdexfile_support",
"libdexfile_static",
"libnativehelper_lazy",
],
},
android: {
bootclasspath_fragments: [
// Adds the fragment and its contents to the sdk.
"art-bootclasspath-fragment",
],
compat_configs: [
"libcore-platform-compat-config",
],
java_header_libs: [
// Needed by any module that builds against any non-numeric
// sdk_version other than "none".
//
// This is actually only used for compiling Java 8 and kotlin.
// Java 9 uses system modules which encapsulates this
// internally.
"core-lambda-stubs",
// Needed by any module that builds against any non-numeric
// sdk_version other than "none" or "core_platform".
//
// This is actually only used for compiling Java 8 and kotlin.
// Java 9 uses system modules which encapsulates this
// internally.
"core.current.stubs",
// Needed by any module that builds against an sdk_version of
// "core_platform".
//
// This is actually only used for compiling Java 8 and kotlin.
// Java 9 uses system modules which encapsulates this
// internally.
"legacy.core.platform.api.stubs",
"stable.core.platform.api.stubs",
],
java_sdk_libs: [
"art.module.public.api",
],
java_system_modules: [
"art-module-public-api-stubs-system-modules",
"art-module-lib-api-stubs-system-modules",
"art-module-intra-core-api-stubs-system-modules",
"core-current-stubs-system-modules",
"core-module-lib-stubs-system-modules",
"legacy-core-platform-api-stubs-system-modules",
"stable-core-platform-api-stubs-system-modules",
],
native_header_libs: [
"libnativeloader-headers",
],
native_shared_libs: [
"libnativebridge_lazy",
"libnativehelper_compat_libc++",
"libnativeloader_lazy",
],
},
linux_bionic: {
enabled: false,
},
darwin: {
enabled: false,
},
},
}
// Exported host tools and libraries.
art_module_exports {
name: "art-module-host-exports",
host_supported: true,
// Enable if SOONG_CONFIG_art_module_source_build is true.
enabled: false,
soong_config_variables: {
source_build: {
enabled: true,
},
},
prebuilt_visibility: prebuilt_visibility,
target: {
host: {
// Set in target.host because the top level compile_multilib
// property is fixed to "both" in the sdk/module_exports
// implementation and cannot be overridden any other way.
compile_multilib: "64",
java_libs: [
"art.module.api.annotations",
// Needed for grpc-grpc-java
"okhttp-norepackage",
],
native_binaries: [
"dex2oat",
"dex2oatd",
"dexdump",
"hiddenapi",
"oatdump",
"profman",
"veridex",
],
native_libs: [
"libartpalette", // libdexfile dependency
"libartbase", // libdexfile dependency
],
},
linux_bionic: {
enabled: false,
},
darwin: {
enabled: false,
},
windows: {
enabled: false,
},
},
}
// Exported tests and supporting libraries
art_module_exports {
name: "art-module-test-exports",
// Enable if SOONG_CONFIG_art_module_source_build is true.
enabled: false,
soong_config_variables: {
source_build: {
enabled: true,
},
},
prebuilt_visibility: prebuilt_visibility,
java_libs: [
"core-compat-test-rules",
"core-test-rules",
"core-tests-support",
"okhttp-tests-nojarjar",
// Needed for CtsJvmtiDeviceRunTestAppBase.
"art_cts_jvmti_test_library",
"expected_cts_outputs",
// Needed for robolectric.
"core-libart-for-host",
"okhttp-for-host",
// Needed for CtsLibcore...TestCases
"libcore-expectations-knownfailures-jar",
"libcore-expectations-virtualdeviceknownfailures-jar",
// Needed for CtsLibcoreOkHttpTestCases
"okhttp-nojarjar",
],
java_tests: [
// Needed for CtsJdwpTestCases.
"apache-harmony-jdwp-tests",
"libcore-crypto-tests",
// Needed for CtsLibcoreOjTestCases
"core-ojtests-public",
// Needed for CtsLibcoreJsr166TestCases
"jsr166-tests",
// Needed for CtsLibcoreTestCases
"apache-harmony-tests",
"core-tests",
],
native_shared_libs: [
"libjavacoretests",
],
native_static_libs: [
// TODO(b/187288515): Providing this as a prebuilt introduces an issue
// with sdk_version propagation. Temporarily use the source library
// instead.
//"libctstiagent",
],
}
|