blob: 3e09add4a94a609541a2897295a338264773fae5 [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",
Colin Cross9272ade2016-08-17 15:24:12 -070054 "android/onceper.go",
Colin Cross635c3b02016-05-18 15:37:25 -070055 "android/package_ctx.go",
56 "android/paths.go",
Colin Crossce75d2c2016-10-06 16:12:58 -070057 "android/prebuilt.go",
Colin Cross38f794e2017-09-07 10:53:07 -070058 "android/proto.go",
Colin Cross798bfce2016-10-12 14:28:16 -070059 "android/register.go",
Colin Cross0875c522017-11-28 17:34:01 -080060 "android/singleton.go",
Colin Crosscec81712017-07-13 14:43:27 -070061 "android/testing.go",
Colin Cross635c3b02016-05-18 15:37:25 -070062 "android/util.go",
63 "android/variable.go",
Dan Willemsene8b1bc02016-05-12 19:03:10 -070064
65 // Lock down environment access last
Colin Cross635c3b02016-05-18 15:37:25 -070066 "android/env.go",
Colin Cross3f40fa42015-01-30 17:27:36 -080067 ],
Dan Willemsen34cc69e2015-09-23 15:26:20 -070068 testSrcs: [
Jeff Gastonf5f6e492017-11-20 14:31:11 -080069 "android/config_test.go",
Colin Cross6bde0942016-11-04 14:36:38 -070070 "android/expand_test.go",
Jeff Gaston088e29e2017-11-29 16:47:17 -080071 "android/namespace_test.go",
Colin Cross635c3b02016-05-18 15:37:25 -070072 "android/paths_test.go",
Colin Cross0d614dd2016-10-14 15:38:43 -070073 "android/prebuilt_test.go",
Colin Crossb6715442017-10-24 11:13:31 -070074 "android/util_test.go",
Colin Cross7e0eaf12017-05-05 16:16:24 -070075 "android/variable_test.go",
Dan Willemsen34cc69e2015-09-23 15:26:20 -070076 ],
Colin Crossba442872015-03-14 14:26:32 -070077}
Colin Cross3f40fa42015-01-30 17:27:36 -080078
Colin Crossba442872015-03-14 14:26:32 -070079bootstrap_go_package {
Colin Crossb98c8b02016-07-29 13:44:28 -070080 name: "soong-cc-config",
81 pkgPath: "android/soong/cc/config",
82 deps: [
83 "soong-android",
84 ],
85 srcs: [
86 "cc/config/clang.go",
87 "cc/config/global.go",
Dan Willemsena03cf6d2016-09-26 15:45:04 -070088 "cc/config/tidy.go",
Colin Crossb98c8b02016-07-29 13:44:28 -070089 "cc/config/toolchain.go",
90
91 "cc/config/arm_device.go",
92 "cc/config/arm64_device.go",
93 "cc/config/mips_device.go",
94 "cc/config/mips64_device.go",
95 "cc/config/x86_device.go",
96 "cc/config/x86_64_device.go",
97
98 "cc/config/x86_darwin_host.go",
99 "cc/config/x86_linux_host.go",
Dan Willemsen01a405a2016-06-13 17:19:03 -0700100 "cc/config/x86_linux_bionic_host.go",
Colin Crossb98c8b02016-07-29 13:44:28 -0700101 "cc/config/x86_windows_host.go",
102 ],
Dan Willemsena03cf6d2016-09-26 15:45:04 -0700103 testSrcs: [
104 "cc/config/tidy_test.go",
105 ],
Colin Crossb98c8b02016-07-29 13:44:28 -0700106}
107
108bootstrap_go_package {
Colin Crossba442872015-03-14 14:26:32 -0700109 name: "soong-cc",
110 pkgPath: "android/soong/cc",
111 deps: [
Colin Cross3f40fa42015-01-30 17:27:36 -0800112 "blueprint",
113 "blueprint-pathtools",
Colin Cross463a90e2015-06-17 14:20:06 -0700114 "soong",
Colin Cross635c3b02016-05-18 15:37:25 -0700115 "soong-android",
Colin Crossb98c8b02016-07-29 13:44:28 -0700116 "soong-cc-config",
Colin Cross5049f022015-03-18 13:28:46 -0700117 "soong-genrule",
Colin Cross3f40fa42015-01-30 17:27:36 -0800118 ],
Colin Crossba442872015-03-14 14:26:32 -0700119 srcs: [
Dan Willemsen218f6562015-07-08 18:13:11 -0700120 "cc/androidmk.go",
Colin Cross3f40fa42015-01-30 17:27:36 -0800121 "cc/builder.go",
122 "cc/cc.go",
Dan Willemsen20acc5c2016-05-25 14:47:21 -0700123 "cc/check.go",
Dan Willemsen581341d2017-02-09 16:16:31 -0800124 "cc/coverage.go",
Colin Cross581c1892015-04-07 16:50:10 -0700125 "cc/gen.go",
Stephen Craneba090d12017-05-09 15:44:35 -0700126 "cc/lto.go",
Dan Willemsen4b7d5de2016-01-12 23:20:28 -0800127 "cc/makevars.go",
Pirama Arumuga Nainarada83ec2017-08-31 23:38:27 -0700128 "cc/pgo.go",
Colin Crossce75d2c2016-10-06 16:12:58 -0700129 "cc/prebuilt.go",
Colin Cross0c461f12016-10-20 16:11:43 -0700130 "cc/proto.go",
Dan Willemsen394e9dc2016-09-14 15:04:48 -0700131 "cc/relocation_packer.go",
Colin Cross2a252be2017-05-01 17:37:24 -0700132 "cc/rs.go",
Colin Cross16b23492016-01-06 14:41:07 -0800133 "cc/sanitize.go",
Jayant Chowdhary3e231fd2017-02-08 13:45:53 -0800134 "cc/sabi.go",
Colin Crossca860ac2016-01-04 14:34:37 -0800135 "cc/stl.go",
Colin Cross4d9c2d12016-07-29 12:48:20 -0700136 "cc/strip.go",
Dan Willemsena03cf6d2016-09-26 15:45:04 -0700137 "cc/tidy.go",
Colin Cross3f40fa42015-01-30 17:27:36 -0800138 "cc/util.go",
Justin Yun8effde42017-06-23 19:24:43 +0900139 "cc/vndk.go",
Justin Yun71549282017-11-17 12:10:28 +0900140 "cc/vndk_prebuilt.go",
Colin Cross3f40fa42015-01-30 17:27:36 -0800141
Fabien Sanglardd61f1f42017-01-10 16:21:22 -0800142 "cc/cmakelists.go",
Colin Cross4d9c2d12016-07-29 12:48:20 -0700143 "cc/compiler.go",
144 "cc/installer.go",
145 "cc/linker.go",
146
147 "cc/binary.go",
148 "cc/library.go",
149 "cc/object.go",
150 "cc/test.go",
Colin Crossb916a382016-07-29 17:28:03 -0700151 "cc/toolchain_library.go",
Colin Cross4d9c2d12016-07-29 12:48:20 -0700152
153 "cc/ndk_prebuilt.go",
Dan Albert914449f2016-06-17 16:45:24 -0700154 "cc/ndk_headers.go",
155 "cc/ndk_library.go",
156 "cc/ndk_sysroot.go",
Dan Willemsenb916b802017-03-19 13:44:32 -0700157
158 "cc/llndk_library.go",
Jiyong Parkd773eb32017-07-03 13:18:12 +0900159
160 "cc/kernel_headers.go",
Dan Willemsen3e5bdf22017-09-13 18:37:08 -0700161
162 "cc/genrule.go",
Colin Cross3f40fa42015-01-30 17:27:36 -0800163 ],
Dan Willemsene5e20332015-06-23 19:46:20 -0700164 testSrcs: [
165 "cc/cc_test.go",
Colin Crossf18e1102017-11-16 14:33:08 -0800166 "cc/gen_test.go",
Colin Crossad59e752017-11-16 14:29:11 -0800167 "cc/library_test.go",
Colin Crossfaeb7aa2017-02-01 14:12:44 -0800168 "cc/test_data_test.go",
Dan Willemsene5e20332015-06-23 19:46:20 -0700169 ],
Dan Willemsen98b26c52015-07-27 15:08:24 -0700170 pluginFor: ["soong_build"],
Colin Crossba442872015-03-14 14:26:32 -0700171}
Colin Cross3f40fa42015-01-30 17:27:36 -0800172
Colin Cross5049f022015-03-18 13:28:46 -0700173bootstrap_go_package {
174 name: "soong-genrule",
175 pkgPath: "android/soong/genrule",
176 deps: [
177 "blueprint",
178 "blueprint-pathtools",
Colin Cross463a90e2015-06-17 14:20:06 -0700179 "soong",
Colin Cross635c3b02016-05-18 15:37:25 -0700180 "soong-android",
Jeff Gastonefc1b412017-03-29 17:29:06 -0700181 "soong-shared",
Colin Cross5049f022015-03-18 13:28:46 -0700182 ],
183 srcs: [
Colin Cross068e0fe2016-12-13 15:23:47 -0800184 "genrule/filegroup.go",
Colin Cross5049f022015-03-18 13:28:46 -0700185 "genrule/genrule.go",
186 ],
Dan Willemsen98b26c52015-07-27 15:08:24 -0700187 pluginFor: ["soong_build"],
Colin Cross5049f022015-03-18 13:28:46 -0700188}
Colin Cross2fe66872015-03-30 17:20:39 -0700189
Colin Cross2fe66872015-03-30 17:20:39 -0700190bootstrap_go_package {
Nan Zhang6d34b302017-02-04 17:47:46 -0800191 name: "soong-phony",
192 pkgPath: "android/soong/phony",
193 deps: [
194 "blueprint",
195 "soong-android",
196 ],
197 srcs: [
198 "phony/phony.go",
199 ],
200 pluginFor: ["soong_build"],
201}
202
203bootstrap_go_package {
Colin Cross2fe66872015-03-30 17:20:39 -0700204 name: "soong-java",
205 pkgPath: "android/soong/java",
206 deps: [
207 "blueprint",
208 "blueprint-pathtools",
Colin Cross463a90e2015-06-17 14:20:06 -0700209 "soong",
Colin Cross635c3b02016-05-18 15:37:25 -0700210 "soong-android",
Colin Cross0607cf72015-04-28 13:28:51 -0700211 "soong-genrule",
Colin Cross3e3e72d2017-06-22 17:20:19 -0700212 "soong-java-config",
Colin Cross2fe66872015-03-30 17:20:39 -0700213 ],
214 srcs: [
Colin Cross3bc7ffa2017-11-22 16:19:37 -0800215 "java/aapt2.go",
Dan Willemsen218f6562015-07-08 18:13:11 -0700216 "java/androidmk.go",
Colin Cross30e076a2015-04-13 13:58:27 -0700217 "java/app_builder.go",
218 "java/app.go",
Colin Cross2fe66872015-03-30 17:20:39 -0700219 "java/builder.go",
Colin Crossc0b06f12015-04-08 13:03:43 -0700220 "java/gen.go",
Colin Crosscb933592017-11-22 13:49:43 -0800221 "java/jacoco.go",
Colin Cross2fe66872015-03-30 17:20:39 -0700222 "java/java.go",
Colin Cross6af17aa2017-09-20 12:59:05 -0700223 "java/proto.go",
Colin Cross2fe66872015-03-30 17:20:39 -0700224 "java/resources.go",
Colin Cross1369cdb2017-09-29 17:58:17 -0700225 "java/system_modules.go",
Colin Cross2fe66872015-03-30 17:20:39 -0700226 ],
Colin Cross72bb3632017-07-13 16:23:21 -0700227 testSrcs: [
Colin Cross44f06682017-11-29 00:17:36 -0800228 "java/app_test.go",
Colin Cross72bb3632017-07-13 16:23:21 -0700229 "java/java_test.go",
230 ],
Dan Willemsen98b26c52015-07-27 15:08:24 -0700231 pluginFor: ["soong_build"],
Colin Cross2fe66872015-03-30 17:20:39 -0700232}
233
Nan Zhangdb0b9a32017-02-27 10:12:13 -0800234bootstrap_go_package {
Colin Cross3e3e72d2017-06-22 17:20:19 -0700235 name: "soong-java-config",
236 pkgPath: "android/soong/java/config",
237 deps: [
238 "blueprint-proptools",
239 "soong-android",
240 ],
241 srcs: [
242 "java/config/config.go",
Colin Crossfee57cb2017-09-05 13:16:45 -0700243 "java/config/error_prone.go",
Colin Cross93e85952017-08-15 13:34:18 -0700244 "java/config/kotlin.go",
Colin Cross3e3e72d2017-06-22 17:20:19 -0700245 "java/config/makevars.go",
246 ],
247}
248
249bootstrap_go_package {
Nan Zhangdb0b9a32017-02-27 10:12:13 -0800250 name: "soong-python",
251 pkgPath: "android/soong/python",
252 deps: [
253 "blueprint",
254 "soong-android",
255 ],
256 srcs: [
Nan Zhang5323f8e2017-05-10 13:37:54 -0700257 "python/androidmk.go",
Nan Zhangdb0b9a32017-02-27 10:12:13 -0800258 "python/binary.go",
259 "python/builder.go",
Nan Zhanga3fc4ba2017-07-20 17:43:37 -0700260 "python/defaults.go",
Nan Zhang5323f8e2017-05-10 13:37:54 -0700261 "python/installer.go",
Nan Zhangdb0b9a32017-02-27 10:12:13 -0800262 "python/library.go",
263 "python/python.go",
Nan Zhang5323f8e2017-05-10 13:37:54 -0700264 "python/test.go",
Nan Zhangdb0b9a32017-02-27 10:12:13 -0800265 ],
266 testSrcs: [
267 "python/python_test.go",
268 ],
269 pluginFor: ["soong_build"],
270}
271
Jeff Gastonefc1b412017-03-29 17:29:06 -0700272bootstrap_go_package {
273 name: "soong-shared",
274 pkgPath: "android/soong/shared",
275 srcs: [
276 "shared/paths.go",
277 ],
278}
279
Colin Cross80031312015-03-14 14:28:22 -0700280//
Dan Willemsen00fcbde2016-11-17 00:25:59 -0800281// Defaults to enable various configurations of host bionic
282//
283
284cc_defaults {
285 name: "linux_bionic_supported",
286 host_supported: true,
287 target: {
288 host: {
289 enabled: false,
290 },
291 linux_bionic: {
292 enabled: true,
293 },
294 },
295}
296
297//
Colin Cross80031312015-03-14 14:28:22 -0700298// C static libraries extracted from the gcc toolchain
299//
300
Colin Crossba442872015-03-14 14:26:32 -0700301toolchain_library {
302 name: "libatomic",
Dan Willemsen2e47b342016-11-17 01:02:25 -0800303 defaults: ["linux_bionic_supported"],
Dan Willemsen4416e5d2017-04-06 12:43:22 -0700304 vendor_available: true,
Dan Willemseneba363e2015-07-08 18:11:14 -0700305 arch: {
306 arm: {
307 instruction_set: "arm",
308 },
309 },
Colin Crossba442872015-03-14 14:26:32 -0700310}
Colin Cross3f40fa42015-01-30 17:27:36 -0800311
Colin Crossba442872015-03-14 14:26:32 -0700312toolchain_library {
313 name: "libgcc",
Dan Willemsen2e47b342016-11-17 01:02:25 -0800314 defaults: ["linux_bionic_supported"],
Dan Willemsen4416e5d2017-04-06 12:43:22 -0700315 vendor_available: true,
Dan Willemseneba363e2015-07-08 18:11:14 -0700316 arch: {
317 arm: {
318 instruction_set: "arm",
319 },
320 },
Colin Crossba442872015-03-14 14:26:32 -0700321}
Colin Cross3f40fa42015-01-30 17:27:36 -0800322
Colin Crossba442872015-03-14 14:26:32 -0700323toolchain_library {
Josh Gao7bd4c5c2017-02-23 17:52:24 -0800324 name: "libwinpthread",
325 host_supported: true,
326 enabled: false,
327 target: {
328 windows: {
Dan Willemsenc77a0b32017-09-18 23:19:12 -0700329 enabled: true,
Josh Gao7bd4c5c2017-02-23 17:52:24 -0800330 },
331 },
332}
333
334toolchain_library {
Colin Crossba442872015-03-14 14:26:32 -0700335 name: "libgcov",
Dan Willemsen2e47b342016-11-17 01:02:25 -0800336 defaults: ["linux_bionic_supported"],
Dan Willemseneba363e2015-07-08 18:11:14 -0700337 arch: {
338 arm: {
339 instruction_set: "arm",
340 },
341 },
Colin Crossba442872015-03-14 14:26:32 -0700342}
Jiyong Parkd773eb32017-07-03 13:18:12 +0900343
344kernel_headers {
345 name: "device_kernel_headers",
346 vendor: true,
347}
Dan Willemsenc77a0b32017-09-18 23:19:12 -0700348
349cc_genrule {
350 name: "host_bionic_linker_asm",
351 host_supported: true,
352 device_supported: false,
353 target: {
354 linux_bionic: {
355 enabled: true,
356 },
Dan Willemsen9d6c6722017-10-02 10:41:07 -0700357 linux_glibc: {
Dan Willemsenc77a0b32017-09-18 23:19:12 -0700358 enabled: false,
359 },
360 darwin: {
361 enabled: false,
362 },
363 },
364 tools: ["extract_linker"],
365 cmd: "$(location) -s $(out) $(in)",
366 srcs: [":linker"],
367 out: ["linker.s"],
368}
369
370cc_genrule {
371 name: "host_bionic_linker_script",
372 host_supported: true,
373 device_supported: false,
374 target: {
375 linux_bionic: {
376 enabled: true,
377 },
Dan Willemsen9d6c6722017-10-02 10:41:07 -0700378 linux_glibc: {
Dan Willemsenc77a0b32017-09-18 23:19:12 -0700379 enabled: false,
380 },
381 darwin: {
382 enabled: false,
383 },
384 },
385 tools: ["extract_linker"],
386 cmd: "$(location) -T $(out) $(in)",
387 srcs: [":linker"],
388 out: ["linker.script"],
389}