blob: f54346ff1ea8e6f59484099060ec74d11e818fee [file] [log] [blame]
Bob Badour665239b2021-10-20 14:13:22 -07001package {
2 default_applicable_licenses: ["Android-Apache-2.0"],
3}
4
Dan Willemsen17df46e2021-07-13 21:52:51 -07005android_sdk_repo_host {
6 name: "build-tools",
7 product_variables: {
8 platform_version_name: {
9 base_dir: "android-%s",
10 },
11 },
12
13 srcs: [
14 ":build_tools_source_properties",
15 ":build_tools_runtime_properties",
16 ],
17
Paul Lawrence9b3ab882022-11-08 20:41:13 +000018 merge_zips: [
19 ":build-tools_renderscript_includes",
20 ":renderscript-clang-include",
21 ":renderscript_sdk_prebuilts",
22 ],
23
Dan Willemsen17df46e2021-07-13 21:52:51 -070024 multilib: {
25 common: {
26 deps: [
27 "build-tools_core-lambda-stubs",
28 ],
29 },
30 },
31 deps_remap: [
32 {
33 from: "framework/build-tools_core-lambda-stubs.jar",
34 to: "core-lambda-stubs.jar",
35 },
36 ],
37
38 target: {
39 linux: {
40 merge_zips: [":build-tools-lld-linux"],
41 strip_files: [
42 "lib64/*.so",
43 "lld-bin/lld",
Yi Kongf1995f42023-02-16 07:41:51 +000044 "lib64/libc++.so.1",
Dan Willemsen17df46e2021-07-13 21:52:51 -070045 ],
46 },
47 darwin: {
48 merge_zips: [":build-tools-lld-darwin"],
49 strip_files: [
50 "lib64/*.dylib",
51 "lld-bin/lld",
52 ],
53 },
54 not_windows: {
55 deps: [
56 "aapt",
57 "aapt2",
58 "aidl",
59 "apksigner",
Paul Lawrence9b3ab882022-11-08 20:41:13 +000060 "bcc_compat",
Dan Willemsen17df46e2021-07-13 21:52:51 -070061 "d8",
62 "dexdump",
Paul Lawrence9b3ab882022-11-08 20:41:13 +000063 "llvm-rs-cc",
Dan Willemsen17df46e2021-07-13 21:52:51 -070064 "split-select",
65 "zipalign",
66 ],
67 deps_remap: [
68 {
69 from: "bin/*",
70 to: "./",
71 },
72 {
73 from: "framework/*",
74 to: "./lib/",
75 },
76 ],
77 strip_files: [
78 "aapt",
79 "aapt2",
80 "aidl",
Paul Lawrence9b3ab882022-11-08 20:41:13 +000081 "bcc_compat",
82 "llvm-rs-cc",
Dan Willemsen17df46e2021-07-13 21:52:51 -070083 "split-select",
84 "zipalign",
85 ],
86 },
87 windows: {
88 enabled: true,
89 merge_zips: [":build-tools-lld-windows"],
90
91 compile_multilib: "both",
92 multilib: {
93 lib32: {
94 deps: [
95 "aapt",
Dan Willemsen17df46e2021-07-13 21:52:51 -070096 "aidl",
97 "apksigner",
Paul Lawrence9b3ab882022-11-08 20:41:13 +000098 "bcc_compat",
Dan Willemsen17df46e2021-07-13 21:52:51 -070099 "d8",
100 "dexdump",
Dan Willemsen17df46e2021-07-13 21:52:51 -0700101 "libwinpthread-1",
Paul Lawrence9b3ab882022-11-08 20:41:13 +0000102 "lld",
103 "llvm-rs-cc",
Dan Willemsen17df46e2021-07-13 21:52:51 -0700104 "split-select",
105 "zipalign",
106 ],
107 },
108 lib64: {
109 deps: [
Diego Perez4f99a312023-02-10 11:13:57 +0000110 "aapt2",
Dan Willemsen17df46e2021-07-13 21:52:51 -0700111 "libwinpthread-1",
112 ],
113 },
114 },
115 deps_remap: [
116 {
117 from: "bin/*",
118 to: "./",
119 },
120 {
121 from: "lib/*",
122 to: "./",
123 },
124 {
125 from: "framework/*",
126 to: "./lib/",
127 },
128 ],
129 strip_files: [
130 "*.dll",
131 "aapt.exe",
132 "aapt2.exe",
133 "aidl.exe",
Paul Lawrence9b3ab882022-11-08 20:41:13 +0000134 "bcc_compat.exe",
Dan Willemsen17df46e2021-07-13 21:52:51 -0700135 "dexdump.exe",
136 "lib64/*.dll",
137 "lld-bin/*.dll",
138 "lld-bin/*.exe",
139 "lld.exe",
Paul Lawrence9b3ab882022-11-08 20:41:13 +0000140 "llvm-rs-cc.exe",
Dan Willemsen17df46e2021-07-13 21:52:51 -0700141 "split-select.exe",
142 "zipalign.exe",
143 ],
144 },
145 },
146}
147
Paul Lawrence9b3ab882022-11-08 20:41:13 +0000148// Rename rs_script_api files to renderscript/include/...
149genrule {
150 name: "build-tools_renderscript_includes",
151 visibility: ["//visibility:private"],
152 tools: ["soong_zip"],
153 cmd: "echo $(in) >$(genDir)/list && " +
154 "$(location soong_zip) -o $(out) -P renderscript " +
155 "-C $$(dirname $$(dirname $$(awk '{ print $$1 }' $(genDir)/list))) -l $(genDir)/list",
156 srcs: [":rs_script_api"],
157 out: ["rs_script_api.zip"],
158}
159
Dan Willemsen17df46e2021-07-13 21:52:51 -0700160// This is a device library, so it can't be used by android_sdk_repo_host directly.
161java_device_for_host {
162 name: "build-tools_core-lambda-stubs-device",
163 visibility: ["//visibility:private"],
Paul Duffine52040b2022-11-25 17:10:06 +0000164 // Use the prebuilt of the stubs irrespective of whether prebuilts are enabled
165 // in this build configuration. This ensures that this non-host specific library
166 // is treated consistently on all hosts.
167 libs: ["prebuilt_core-lambda-stubs"],
Dan Willemsen17df46e2021-07-13 21:52:51 -0700168 target: {
169 windows: {
170 enabled: true,
171 },
172 },
173}
174
175java_library_host {
176 name: "build-tools_core-lambda-stubs",
177 visibility: ["//visibility:private"],
178 installable: true,
179 static_libs: ["build-tools_core-lambda-stubs-device"],
180 target: {
181 windows: {
182 enabled: true,
183 },
184 },
185}
186
187android_sdk_repo_host {
188 name: "platform-tools",
189 base_dir: "platform-tools",
190
191 deps: [
192 "adb",
Dan Willemsen17df46e2021-07-13 21:52:51 -0700193 "etc1tool",
194 "fastboot",
195 "hprof-conv",
196 "make_f2fs",
197 "make_f2fs_casefold",
198 "mke2fs",
199 "sqlite3",
200 ],
201 deps_remap: [
202 {
203 from: "bin/*",
204 to: "./",
205 },
206 ],
207
208 srcs: [
209 ":mke2fs_conf",
210 ":platform_tools_properties",
211 ],
212
Dan Willemsen17df46e2021-07-13 21:52:51 -0700213 target: {
214 linux: {
215 strip_files: ["lib64/*.so"],
216 },
Jiyong Parkd5b42c12024-05-01 12:36:10 +0000217 linux_bionic: {
218 enabled: false,
219 },
Dan Willemsen17df46e2021-07-13 21:52:51 -0700220 darwin: {
221 strip_files: ["lib64/*.dylib"],
222 },
223 not_windows: {
Dan Willemsen17df46e2021-07-13 21:52:51 -0700224 strip_files: [
225 "adb",
Dan Willemsen17df46e2021-07-13 21:52:51 -0700226 "etc1tool",
227 "fastboot",
228 "hprof-conv",
229 "make_f2fs_casefold",
230 "make_f2fs",
231 "mke2fs",
Dan Willemsen17df46e2021-07-13 21:52:51 -0700232 "sqlite3",
233 ],
234 },
235 windows: {
236 enabled: true,
237 deps: [
238 "AdbWinUsbApi",
239 "AdbWinApi",
240 "libwinpthread-1",
241 ],
242 deps_remap: [
243 {
244 from: "lib/*",
245 to: "./",
246 },
247 ],
248 strip_files: [
249 "*.exe",
250 ],
251 },
252 },
253}