blob: f2bc5fb91bca0a5ce2c1a91ab4ea1dba719e9a72 [file] [log] [blame]
Dan Willemsen377737a2016-08-15 15:02:23 -07001subdirs = [
2 "androidmk",
Jeff Gastonaff66e52017-06-19 15:39:54 -07003 "bpfix",
Dan Willemsen377737a2016-08-15 15:02:23 -07004 "cmd/*",
Jeff Gastonf1fd45e2017-08-09 18:25:28 -07005 "fs",
6 "finder",
Jeff Gaston01547b22017-08-21 20:13:28 -07007 "jar",
Jeff Gaston11b5c512017-10-12 12:19:14 -07008 "zip",
Dan Willemsen377737a2016-08-15 15:02:23 -07009 "third_party/zip",
Dan Willemsen1e704462016-08-21 15:17:17 -070010 "ui/*",
Dan Willemsen377737a2016-08-15 15:02:23 -070011]
Colin Cross68f55102015-03-25 14:43:57 -070012
13bootstrap_go_package {
14 name: "soong-env",
15 pkgPath: "android/soong/env",
16 srcs: [
17 "env/env.go",
18 ],
19}
20
Colin Crossba442872015-03-14 14:26:32 -070021bootstrap_go_package {
Colin Cross463a90e2015-06-17 14:20:06 -070022 name: "soong",
23 pkgPath: "android/soong",
24 deps: [
25 "blueprint",
26 ],
27 srcs: [
28 "doc.go",
Colin Cross463a90e2015-06-17 14:20:06 -070029 ],
30}
31
32bootstrap_go_package {
Colin Cross635c3b02016-05-18 15:37:25 -070033 name: "soong-android",
34 pkgPath: "android/soong/android",
Colin Crossba442872015-03-14 14:26:32 -070035 deps: [
Colin Cross3f40fa42015-01-30 17:27:36 -080036 "blueprint",
37 "blueprint-bootstrap",
Colin Cross463a90e2015-06-17 14:20:06 -070038 "soong",
Colin Cross68f55102015-03-25 14:43:57 -070039 "soong-env",
Colin Cross3f40fa42015-01-30 17:27:36 -080040 ],
Colin Crossba442872015-03-14 14:26:32 -070041 srcs: [
Colin Cross635c3b02016-05-18 15:37:25 -070042 "android/androidmk.go",
Dan Albert30c9d6e2017-03-28 14:54:55 -070043 "android/api_levels.go",
Colin Cross635c3b02016-05-18 15:37:25 -070044 "android/arch.go",
45 "android/config.go",
46 "android/defaults.go",
47 "android/defs.go",
Colin Cross6bde0942016-11-04 14:36:38 -070048 "android/expand.go",
Colin Cross178a5092016-09-13 13:42:32 -070049 "android/hooks.go",
Colin Cross635c3b02016-05-18 15:37:25 -070050 "android/makevars.go",
51 "android/module.go",
52 "android/mutator.go",
Jeff Gaston088e29e2017-11-29 16:47:17 -080053 "android/namespace.go",
Steven Moreland65b3fd92017-12-06 14:18:35 -080054 "android/neverallow.go",
Colin Cross9272ade2016-08-17 15:24:12 -070055 "android/onceper.go",
Colin Cross635c3b02016-05-18 15:37:25 -070056 "android/package_ctx.go",
57 "android/paths.go",
Colin Crossce75d2c2016-10-06 16:12:58 -070058 "android/prebuilt.go",
Colin Cross38f794e2017-09-07 10:53:07 -070059 "android/proto.go",
Colin Cross798bfce2016-10-12 14:28:16 -070060 "android/register.go",
Colin Cross0875c522017-11-28 17:34:01 -080061 "android/singleton.go",
Colin Crosscec81712017-07-13 14:43:27 -070062 "android/testing.go",
Colin Cross635c3b02016-05-18 15:37:25 -070063 "android/util.go",
64 "android/variable.go",
Colin Crosse87040b2017-12-11 15:52:26 -080065 "android/writedocs.go",
Dan Willemsene8b1bc02016-05-12 19:03:10 -070066
67 // Lock down environment access last
Colin Cross635c3b02016-05-18 15:37:25 -070068 "android/env.go",
Colin Cross3f40fa42015-01-30 17:27:36 -080069 ],
Dan Willemsen34cc69e2015-09-23 15:26:20 -070070 testSrcs: [
Jeff Gastonf5f6e492017-11-20 14:31:11 -080071 "android/config_test.go",
Colin Cross6bde0942016-11-04 14:36:38 -070072 "android/expand_test.go",
Jeff Gaston088e29e2017-11-29 16:47:17 -080073 "android/namespace_test.go",
Colin Cross635c3b02016-05-18 15:37:25 -070074 "android/paths_test.go",
Colin Cross0d614dd2016-10-14 15:38:43 -070075 "android/prebuilt_test.go",
Colin Crossb6715442017-10-24 11:13:31 -070076 "android/util_test.go",
Colin Cross7e0eaf12017-05-05 16:16:24 -070077 "android/variable_test.go",
Dan Willemsen34cc69e2015-09-23 15:26:20 -070078 ],
Colin Crossba442872015-03-14 14:26:32 -070079}
Colin Cross3f40fa42015-01-30 17:27:36 -080080
Colin Crossba442872015-03-14 14:26:32 -070081bootstrap_go_package {
Colin Crossb98c8b02016-07-29 13:44:28 -070082 name: "soong-cc-config",
83 pkgPath: "android/soong/cc/config",
84 deps: [
85 "soong-android",
86 ],
87 srcs: [
88 "cc/config/clang.go",
89 "cc/config/global.go",
Dan Willemsena03cf6d2016-09-26 15:45:04 -070090 "cc/config/tidy.go",
Colin Crossb98c8b02016-07-29 13:44:28 -070091 "cc/config/toolchain.go",
92
93 "cc/config/arm_device.go",
94 "cc/config/arm64_device.go",
95 "cc/config/mips_device.go",
96 "cc/config/mips64_device.go",
97 "cc/config/x86_device.go",
98 "cc/config/x86_64_device.go",
99
100 "cc/config/x86_darwin_host.go",
101 "cc/config/x86_linux_host.go",
Dan Willemsen01a405a2016-06-13 17:19:03 -0700102 "cc/config/x86_linux_bionic_host.go",
Colin Crossb98c8b02016-07-29 13:44:28 -0700103 "cc/config/x86_windows_host.go",
104 ],
Dan Willemsena03cf6d2016-09-26 15:45:04 -0700105 testSrcs: [
106 "cc/config/tidy_test.go",
107 ],
Colin Crossb98c8b02016-07-29 13:44:28 -0700108}
109
110bootstrap_go_package {
Colin Crossba442872015-03-14 14:26:32 -0700111 name: "soong-cc",
112 pkgPath: "android/soong/cc",
113 deps: [
Colin Cross3f40fa42015-01-30 17:27:36 -0800114 "blueprint",
115 "blueprint-pathtools",
Colin Cross463a90e2015-06-17 14:20:06 -0700116 "soong",
Colin Cross635c3b02016-05-18 15:37:25 -0700117 "soong-android",
Colin Crossb98c8b02016-07-29 13:44:28 -0700118 "soong-cc-config",
Colin Cross5049f022015-03-18 13:28:46 -0700119 "soong-genrule",
Colin Cross3f40fa42015-01-30 17:27:36 -0800120 ],
Colin Crossba442872015-03-14 14:26:32 -0700121 srcs: [
Dan Willemsen218f6562015-07-08 18:13:11 -0700122 "cc/androidmk.go",
Colin Cross3f40fa42015-01-30 17:27:36 -0800123 "cc/builder.go",
124 "cc/cc.go",
Dan Willemsen20acc5c2016-05-25 14:47:21 -0700125 "cc/check.go",
Dan Willemsen581341d2017-02-09 16:16:31 -0800126 "cc/coverage.go",
Colin Cross581c1892015-04-07 16:50:10 -0700127 "cc/gen.go",
Stephen Craneba090d12017-05-09 15:44:35 -0700128 "cc/lto.go",
Dan Willemsen4b7d5de2016-01-12 23:20:28 -0800129 "cc/makevars.go",
Pirama Arumuga Nainarada83ec2017-08-31 23:38:27 -0700130 "cc/pgo.go",
Colin Crossce75d2c2016-10-06 16:12:58 -0700131 "cc/prebuilt.go",
Colin Cross0c461f12016-10-20 16:11:43 -0700132 "cc/proto.go",
Dan Willemsen394e9dc2016-09-14 15:04:48 -0700133 "cc/relocation_packer.go",
Colin Cross2a252be2017-05-01 17:37:24 -0700134 "cc/rs.go",
Colin Cross16b23492016-01-06 14:41:07 -0800135 "cc/sanitize.go",
Jayant Chowdhary3e231fd2017-02-08 13:45:53 -0800136 "cc/sabi.go",
Colin Crossca860ac2016-01-04 14:34:37 -0800137 "cc/stl.go",
Colin Cross4d9c2d12016-07-29 12:48:20 -0700138 "cc/strip.go",
Dan Willemsena03cf6d2016-09-26 15:45:04 -0700139 "cc/tidy.go",
Colin Cross3f40fa42015-01-30 17:27:36 -0800140 "cc/util.go",
Justin Yun8effde42017-06-23 19:24:43 +0900141 "cc/vndk.go",
Justin Yun71549282017-11-17 12:10:28 +0900142 "cc/vndk_prebuilt.go",
Colin Cross3f40fa42015-01-30 17:27:36 -0800143
Fabien Sanglardd61f1f42017-01-10 16:21:22 -0800144 "cc/cmakelists.go",
Colin Cross4d9c2d12016-07-29 12:48:20 -0700145 "cc/compiler.go",
146 "cc/installer.go",
147 "cc/linker.go",
148
149 "cc/binary.go",
150 "cc/library.go",
151 "cc/object.go",
152 "cc/test.go",
Colin Crossb916a382016-07-29 17:28:03 -0700153 "cc/toolchain_library.go",
Colin Cross4d9c2d12016-07-29 12:48:20 -0700154
155 "cc/ndk_prebuilt.go",
Dan Albert914449f2016-06-17 16:45:24 -0700156 "cc/ndk_headers.go",
157 "cc/ndk_library.go",
158 "cc/ndk_sysroot.go",
Dan Willemsenb916b802017-03-19 13:44:32 -0700159
160 "cc/llndk_library.go",
Jiyong Parkd773eb32017-07-03 13:18:12 +0900161
162 "cc/kernel_headers.go",
Dan Willemsen3e5bdf22017-09-13 18:37:08 -0700163
164 "cc/genrule.go",
Colin Cross3f40fa42015-01-30 17:27:36 -0800165 ],
Dan Willemsene5e20332015-06-23 19:46:20 -0700166 testSrcs: [
167 "cc/cc_test.go",
Colin Crossf18e1102017-11-16 14:33:08 -0800168 "cc/gen_test.go",
Colin Crossad59e752017-11-16 14:29:11 -0800169 "cc/library_test.go",
Colin Crossfaeb7aa2017-02-01 14:12:44 -0800170 "cc/test_data_test.go",
Dan Willemsene5e20332015-06-23 19:46:20 -0700171 ],
Dan Willemsen98b26c52015-07-27 15:08:24 -0700172 pluginFor: ["soong_build"],
Colin Crossba442872015-03-14 14:26:32 -0700173}
Colin Cross3f40fa42015-01-30 17:27:36 -0800174
Colin Cross5049f022015-03-18 13:28:46 -0700175bootstrap_go_package {
176 name: "soong-genrule",
177 pkgPath: "android/soong/genrule",
178 deps: [
179 "blueprint",
180 "blueprint-pathtools",
Colin Cross463a90e2015-06-17 14:20:06 -0700181 "soong",
Colin Cross635c3b02016-05-18 15:37:25 -0700182 "soong-android",
Jeff Gastonefc1b412017-03-29 17:29:06 -0700183 "soong-shared",
Colin Cross5049f022015-03-18 13:28:46 -0700184 ],
185 srcs: [
Colin Cross068e0fe2016-12-13 15:23:47 -0800186 "genrule/filegroup.go",
Colin Cross5049f022015-03-18 13:28:46 -0700187 "genrule/genrule.go",
188 ],
Dan Willemsen98b26c52015-07-27 15:08:24 -0700189 pluginFor: ["soong_build"],
Colin Cross5049f022015-03-18 13:28:46 -0700190}
Colin Cross2fe66872015-03-30 17:20:39 -0700191
Colin Cross2fe66872015-03-30 17:20:39 -0700192bootstrap_go_package {
Nan Zhang6d34b302017-02-04 17:47:46 -0800193 name: "soong-phony",
194 pkgPath: "android/soong/phony",
195 deps: [
196 "blueprint",
197 "soong-android",
198 ],
199 srcs: [
200 "phony/phony.go",
201 ],
202 pluginFor: ["soong_build"],
203}
204
205bootstrap_go_package {
Colin Cross2fe66872015-03-30 17:20:39 -0700206 name: "soong-java",
207 pkgPath: "android/soong/java",
208 deps: [
209 "blueprint",
210 "blueprint-pathtools",
Colin Cross463a90e2015-06-17 14:20:06 -0700211 "soong",
Colin Cross635c3b02016-05-18 15:37:25 -0700212 "soong-android",
Colin Cross0607cf72015-04-28 13:28:51 -0700213 "soong-genrule",
Colin Cross3e3e72d2017-06-22 17:20:19 -0700214 "soong-java-config",
Colin Cross2fe66872015-03-30 17:20:39 -0700215 ],
216 srcs: [
Colin Cross3bc7ffa2017-11-22 16:19:37 -0800217 "java/aapt2.go",
Dan Willemsen218f6562015-07-08 18:13:11 -0700218 "java/androidmk.go",
Colin Cross30e076a2015-04-13 13:58:27 -0700219 "java/app_builder.go",
220 "java/app.go",
Colin Cross2fe66872015-03-30 17:20:39 -0700221 "java/builder.go",
Colin Crossf0056cb2017-12-22 15:56:08 -0800222 "java/dex.go",
Nan Zhang581fd212018-01-10 16:06:12 -0800223 "java/droiddoc.go",
Colin Crossc0b06f12015-04-08 13:03:43 -0700224 "java/gen.go",
Colin Cross54250902017-12-05 09:28:08 -0800225 "java/genrule.go",
Colin Crosscb933592017-11-22 13:49:43 -0800226 "java/jacoco.go",
Colin Cross2fe66872015-03-30 17:20:39 -0700227 "java/java.go",
Colin Cross6af17aa2017-09-20 12:59:05 -0700228 "java/proto.go",
Colin Cross2fe66872015-03-30 17:20:39 -0700229 "java/resources.go",
Colin Cross1369cdb2017-09-29 17:58:17 -0700230 "java/system_modules.go",
Colin Cross2fe66872015-03-30 17:20:39 -0700231 ],
Colin Cross72bb3632017-07-13 16:23:21 -0700232 testSrcs: [
Colin Cross44f06682017-11-29 00:17:36 -0800233 "java/app_test.go",
Colin Cross72bb3632017-07-13 16:23:21 -0700234 "java/java_test.go",
235 ],
Dan Willemsen98b26c52015-07-27 15:08:24 -0700236 pluginFor: ["soong_build"],
Colin Cross2fe66872015-03-30 17:20:39 -0700237}
238
Nan Zhangdb0b9a32017-02-27 10:12:13 -0800239bootstrap_go_package {
Colin Cross3e3e72d2017-06-22 17:20:19 -0700240 name: "soong-java-config",
241 pkgPath: "android/soong/java/config",
242 deps: [
243 "blueprint-proptools",
244 "soong-android",
245 ],
246 srcs: [
247 "java/config/config.go",
Colin Crossfee57cb2017-09-05 13:16:45 -0700248 "java/config/error_prone.go",
Colin Cross93e85952017-08-15 13:34:18 -0700249 "java/config/kotlin.go",
Colin Cross3e3e72d2017-06-22 17:20:19 -0700250 "java/config/makevars.go",
251 ],
252}
253
254bootstrap_go_package {
Nan Zhangdb0b9a32017-02-27 10:12:13 -0800255 name: "soong-python",
256 pkgPath: "android/soong/python",
257 deps: [
258 "blueprint",
259 "soong-android",
260 ],
261 srcs: [
Nan Zhang5323f8e2017-05-10 13:37:54 -0700262 "python/androidmk.go",
Nan Zhangdb0b9a32017-02-27 10:12:13 -0800263 "python/binary.go",
264 "python/builder.go",
Nan Zhanga3fc4ba2017-07-20 17:43:37 -0700265 "python/defaults.go",
Nan Zhang5323f8e2017-05-10 13:37:54 -0700266 "python/installer.go",
Nan Zhangdb0b9a32017-02-27 10:12:13 -0800267 "python/library.go",
268 "python/python.go",
Nan Zhang5323f8e2017-05-10 13:37:54 -0700269 "python/test.go",
Nan Zhangdb0b9a32017-02-27 10:12:13 -0800270 ],
271 testSrcs: [
272 "python/python_test.go",
273 ],
274 pluginFor: ["soong_build"],
275}
276
Jeff Gastonefc1b412017-03-29 17:29:06 -0700277bootstrap_go_package {
278 name: "soong-shared",
279 pkgPath: "android/soong/shared",
280 srcs: [
281 "shared/paths.go",
282 ],
283}
284
Colin Cross80031312015-03-14 14:28:22 -0700285//
Dan Willemsen00fcbde2016-11-17 00:25:59 -0800286// Defaults to enable various configurations of host bionic
287//
288
289cc_defaults {
290 name: "linux_bionic_supported",
291 host_supported: true,
292 target: {
293 host: {
294 enabled: false,
295 },
296 linux_bionic: {
297 enabled: true,
298 },
299 },
300}
301
302//
Colin Cross80031312015-03-14 14:28:22 -0700303// C static libraries extracted from the gcc toolchain
304//
305
Colin Crossba442872015-03-14 14:26:32 -0700306toolchain_library {
307 name: "libatomic",
Dan Willemsen2e47b342016-11-17 01:02:25 -0800308 defaults: ["linux_bionic_supported"],
Dan Willemsen4416e5d2017-04-06 12:43:22 -0700309 vendor_available: true,
Dan Willemseneba363e2015-07-08 18:11:14 -0700310 arch: {
311 arm: {
312 instruction_set: "arm",
313 },
314 },
Colin Crossba442872015-03-14 14:26:32 -0700315}
Colin Cross3f40fa42015-01-30 17:27:36 -0800316
Colin Crossba442872015-03-14 14:26:32 -0700317toolchain_library {
318 name: "libgcc",
Dan Willemsen2e47b342016-11-17 01:02:25 -0800319 defaults: ["linux_bionic_supported"],
Dan Willemsen4416e5d2017-04-06 12:43:22 -0700320 vendor_available: true,
Dan Willemseneba363e2015-07-08 18:11:14 -0700321 arch: {
322 arm: {
323 instruction_set: "arm",
324 },
325 },
Colin Crossba442872015-03-14 14:26:32 -0700326}
Colin Cross3f40fa42015-01-30 17:27:36 -0800327
Colin Crossba442872015-03-14 14:26:32 -0700328toolchain_library {
Josh Gao7bd4c5c2017-02-23 17:52:24 -0800329 name: "libwinpthread",
330 host_supported: true,
331 enabled: false,
332 target: {
333 windows: {
Dan Willemsenc77a0b32017-09-18 23:19:12 -0700334 enabled: true,
Josh Gao7bd4c5c2017-02-23 17:52:24 -0800335 },
336 },
337}
338
339toolchain_library {
Colin Crossba442872015-03-14 14:26:32 -0700340 name: "libgcov",
Dan Willemsen2e47b342016-11-17 01:02:25 -0800341 defaults: ["linux_bionic_supported"],
Dan Willemseneba363e2015-07-08 18:11:14 -0700342 arch: {
343 arm: {
344 instruction_set: "arm",
345 },
346 },
Colin Crossba442872015-03-14 14:26:32 -0700347}
Jiyong Parkd773eb32017-07-03 13:18:12 +0900348
349kernel_headers {
350 name: "device_kernel_headers",
351 vendor: true,
352}
Dan Willemsenc77a0b32017-09-18 23:19:12 -0700353
354cc_genrule {
355 name: "host_bionic_linker_asm",
356 host_supported: true,
357 device_supported: false,
358 target: {
359 linux_bionic: {
360 enabled: true,
361 },
Dan Willemsen9d6c6722017-10-02 10:41:07 -0700362 linux_glibc: {
Dan Willemsenc77a0b32017-09-18 23:19:12 -0700363 enabled: false,
364 },
365 darwin: {
366 enabled: false,
367 },
368 },
369 tools: ["extract_linker"],
370 cmd: "$(location) -s $(out) $(in)",
371 srcs: [":linker"],
372 out: ["linker.s"],
373}
374
375cc_genrule {
376 name: "host_bionic_linker_script",
377 host_supported: true,
378 device_supported: false,
379 target: {
380 linux_bionic: {
381 enabled: true,
382 },
Dan Willemsen9d6c6722017-10-02 10:41:07 -0700383 linux_glibc: {
Dan Willemsenc77a0b32017-09-18 23:19:12 -0700384 enabled: false,
385 },
386 darwin: {
387 enabled: false,
388 },
389 },
390 tools: ["extract_linker"],
391 cmd: "$(location) -T $(out) $(in)",
392 srcs: [":linker"],
393 out: ["linker.script"],
394}