blob: 1892670806492d0f0dba3ef5010441383630d039 [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",
Dan Willemsen377737a2016-08-15 15:02:23 -07008 "third_party/zip",
Dan Willemsen1e704462016-08-21 15:17:17 -07009 "ui/*",
Dan Willemsen377737a2016-08-15 15:02:23 -070010]
Colin Cross68f55102015-03-25 14:43:57 -070011
12bootstrap_go_package {
13 name: "soong-env",
14 pkgPath: "android/soong/env",
15 srcs: [
16 "env/env.go",
17 ],
18}
19
Colin Crossba442872015-03-14 14:26:32 -070020bootstrap_go_package {
Colin Cross463a90e2015-06-17 14:20:06 -070021 name: "soong",
22 pkgPath: "android/soong",
23 deps: [
24 "blueprint",
25 ],
26 srcs: [
27 "doc.go",
Colin Cross463a90e2015-06-17 14:20:06 -070028 ],
29}
30
31bootstrap_go_package {
Colin Cross635c3b02016-05-18 15:37:25 -070032 name: "soong-android",
33 pkgPath: "android/soong/android",
Colin Crossba442872015-03-14 14:26:32 -070034 deps: [
Colin Cross3f40fa42015-01-30 17:27:36 -080035 "blueprint",
36 "blueprint-bootstrap",
Colin Cross463a90e2015-06-17 14:20:06 -070037 "soong",
Colin Cross68f55102015-03-25 14:43:57 -070038 "soong-env",
Colin Cross3f40fa42015-01-30 17:27:36 -080039 ],
Colin Crossba442872015-03-14 14:26:32 -070040 srcs: [
Colin Cross635c3b02016-05-18 15:37:25 -070041 "android/androidmk.go",
Dan Albert30c9d6e2017-03-28 14:54:55 -070042 "android/api_levels.go",
Colin Cross635c3b02016-05-18 15:37:25 -070043 "android/arch.go",
44 "android/config.go",
45 "android/defaults.go",
46 "android/defs.go",
Colin Cross6bde0942016-11-04 14:36:38 -070047 "android/expand.go",
Colin Cross178a5092016-09-13 13:42:32 -070048 "android/hooks.go",
Colin Cross635c3b02016-05-18 15:37:25 -070049 "android/makevars.go",
50 "android/module.go",
51 "android/mutator.go",
Colin Cross9272ade2016-08-17 15:24:12 -070052 "android/onceper.go",
Colin Cross635c3b02016-05-18 15:37:25 -070053 "android/package_ctx.go",
54 "android/paths.go",
Colin Crossce75d2c2016-10-06 16:12:58 -070055 "android/prebuilt.go",
Colin Cross38f794e2017-09-07 10:53:07 -070056 "android/proto.go",
Colin Cross798bfce2016-10-12 14:28:16 -070057 "android/register.go",
Colin Crosscec81712017-07-13 14:43:27 -070058 "android/testing.go",
Colin Cross635c3b02016-05-18 15:37:25 -070059 "android/util.go",
60 "android/variable.go",
Dan Willemsene8b1bc02016-05-12 19:03:10 -070061
62 // Lock down environment access last
Colin Cross635c3b02016-05-18 15:37:25 -070063 "android/env.go",
Colin Cross3f40fa42015-01-30 17:27:36 -080064 ],
Dan Willemsen34cc69e2015-09-23 15:26:20 -070065 testSrcs: [
Colin Cross6bde0942016-11-04 14:36:38 -070066 "android/expand_test.go",
Colin Cross635c3b02016-05-18 15:37:25 -070067 "android/paths_test.go",
Colin Cross0d614dd2016-10-14 15:38:43 -070068 "android/prebuilt_test.go",
Colin Cross7e0eaf12017-05-05 16:16:24 -070069 "android/variable_test.go",
Dan Willemsen34cc69e2015-09-23 15:26:20 -070070 ],
Colin Crossba442872015-03-14 14:26:32 -070071}
Colin Cross3f40fa42015-01-30 17:27:36 -080072
Colin Crossba442872015-03-14 14:26:32 -070073bootstrap_go_package {
Colin Crossb98c8b02016-07-29 13:44:28 -070074 name: "soong-cc-config",
75 pkgPath: "android/soong/cc/config",
76 deps: [
77 "soong-android",
78 ],
79 srcs: [
80 "cc/config/clang.go",
81 "cc/config/global.go",
Dan Willemsena03cf6d2016-09-26 15:45:04 -070082 "cc/config/tidy.go",
Colin Crossb98c8b02016-07-29 13:44:28 -070083 "cc/config/toolchain.go",
84
85 "cc/config/arm_device.go",
86 "cc/config/arm64_device.go",
87 "cc/config/mips_device.go",
88 "cc/config/mips64_device.go",
89 "cc/config/x86_device.go",
90 "cc/config/x86_64_device.go",
91
92 "cc/config/x86_darwin_host.go",
93 "cc/config/x86_linux_host.go",
Dan Willemsen01a405a2016-06-13 17:19:03 -070094 "cc/config/x86_linux_bionic_host.go",
Colin Crossb98c8b02016-07-29 13:44:28 -070095 "cc/config/x86_windows_host.go",
96 ],
Dan Willemsena03cf6d2016-09-26 15:45:04 -070097 testSrcs: [
98 "cc/config/tidy_test.go",
99 ],
Colin Crossb98c8b02016-07-29 13:44:28 -0700100}
101
102bootstrap_go_package {
Colin Crossba442872015-03-14 14:26:32 -0700103 name: "soong-cc",
104 pkgPath: "android/soong/cc",
105 deps: [
Colin Cross3f40fa42015-01-30 17:27:36 -0800106 "blueprint",
107 "blueprint-pathtools",
Colin Cross463a90e2015-06-17 14:20:06 -0700108 "soong",
Colin Cross635c3b02016-05-18 15:37:25 -0700109 "soong-android",
Colin Crossb98c8b02016-07-29 13:44:28 -0700110 "soong-cc-config",
Colin Cross5049f022015-03-18 13:28:46 -0700111 "soong-genrule",
Colin Cross3f40fa42015-01-30 17:27:36 -0800112 ],
Colin Crossba442872015-03-14 14:26:32 -0700113 srcs: [
Dan Willemsen218f6562015-07-08 18:13:11 -0700114 "cc/androidmk.go",
Colin Cross3f40fa42015-01-30 17:27:36 -0800115 "cc/builder.go",
116 "cc/cc.go",
Dan Willemsen20acc5c2016-05-25 14:47:21 -0700117 "cc/check.go",
Dan Willemsen581341d2017-02-09 16:16:31 -0800118 "cc/coverage.go",
Colin Cross581c1892015-04-07 16:50:10 -0700119 "cc/gen.go",
Stephen Craneba090d12017-05-09 15:44:35 -0700120 "cc/lto.go",
Dan Willemsen4b7d5de2016-01-12 23:20:28 -0800121 "cc/makevars.go",
Colin Crossce75d2c2016-10-06 16:12:58 -0700122 "cc/prebuilt.go",
Colin Cross0c461f12016-10-20 16:11:43 -0700123 "cc/proto.go",
Dan Willemsen394e9dc2016-09-14 15:04:48 -0700124 "cc/relocation_packer.go",
Colin Cross2a252be2017-05-01 17:37:24 -0700125 "cc/rs.go",
Colin Cross16b23492016-01-06 14:41:07 -0800126 "cc/sanitize.go",
Jayant Chowdhary3e231fd2017-02-08 13:45:53 -0800127 "cc/sabi.go",
Colin Crossca860ac2016-01-04 14:34:37 -0800128 "cc/stl.go",
Colin Cross4d9c2d12016-07-29 12:48:20 -0700129 "cc/strip.go",
Dan Willemsena03cf6d2016-09-26 15:45:04 -0700130 "cc/tidy.go",
Colin Cross3f40fa42015-01-30 17:27:36 -0800131 "cc/util.go",
Justin Yun8effde42017-06-23 19:24:43 +0900132 "cc/vndk.go",
Colin Cross3f40fa42015-01-30 17:27:36 -0800133
Fabien Sanglardd61f1f42017-01-10 16:21:22 -0800134 "cc/cmakelists.go",
Colin Cross4d9c2d12016-07-29 12:48:20 -0700135 "cc/compiler.go",
136 "cc/installer.go",
137 "cc/linker.go",
138
139 "cc/binary.go",
140 "cc/library.go",
141 "cc/object.go",
142 "cc/test.go",
Colin Crossb916a382016-07-29 17:28:03 -0700143 "cc/toolchain_library.go",
Colin Cross4d9c2d12016-07-29 12:48:20 -0700144
145 "cc/ndk_prebuilt.go",
Dan Albert914449f2016-06-17 16:45:24 -0700146 "cc/ndk_headers.go",
147 "cc/ndk_library.go",
148 "cc/ndk_sysroot.go",
Dan Willemsenb916b802017-03-19 13:44:32 -0700149
150 "cc/llndk_library.go",
Jiyong Parkd773eb32017-07-03 13:18:12 +0900151
152 "cc/kernel_headers.go",
Dan Willemsen3e5bdf22017-09-13 18:37:08 -0700153
154 "cc/genrule.go",
Colin Cross3f40fa42015-01-30 17:27:36 -0800155 ],
Dan Willemsene5e20332015-06-23 19:46:20 -0700156 testSrcs: [
157 "cc/cc_test.go",
Colin Crossfaeb7aa2017-02-01 14:12:44 -0800158 "cc/test_data_test.go",
Dan Willemsene5e20332015-06-23 19:46:20 -0700159 ],
Dan Willemsen98b26c52015-07-27 15:08:24 -0700160 pluginFor: ["soong_build"],
Colin Crossba442872015-03-14 14:26:32 -0700161}
Colin Cross3f40fa42015-01-30 17:27:36 -0800162
Colin Cross5049f022015-03-18 13:28:46 -0700163bootstrap_go_package {
164 name: "soong-genrule",
165 pkgPath: "android/soong/genrule",
166 deps: [
167 "blueprint",
168 "blueprint-pathtools",
Colin Cross463a90e2015-06-17 14:20:06 -0700169 "soong",
Colin Cross635c3b02016-05-18 15:37:25 -0700170 "soong-android",
Jeff Gastonefc1b412017-03-29 17:29:06 -0700171 "soong-shared",
Colin Cross5049f022015-03-18 13:28:46 -0700172 ],
173 srcs: [
Colin Cross068e0fe2016-12-13 15:23:47 -0800174 "genrule/filegroup.go",
Colin Cross5049f022015-03-18 13:28:46 -0700175 "genrule/genrule.go",
176 ],
Dan Willemsen98b26c52015-07-27 15:08:24 -0700177 pluginFor: ["soong_build"],
Colin Cross5049f022015-03-18 13:28:46 -0700178}
Colin Cross2fe66872015-03-30 17:20:39 -0700179
Colin Cross2fe66872015-03-30 17:20:39 -0700180bootstrap_go_package {
Nan Zhang6d34b302017-02-04 17:47:46 -0800181 name: "soong-phony",
182 pkgPath: "android/soong/phony",
183 deps: [
184 "blueprint",
185 "soong-android",
186 ],
187 srcs: [
188 "phony/phony.go",
189 ],
190 pluginFor: ["soong_build"],
191}
192
193bootstrap_go_package {
Colin Cross2fe66872015-03-30 17:20:39 -0700194 name: "soong-java",
195 pkgPath: "android/soong/java",
196 deps: [
197 "blueprint",
198 "blueprint-pathtools",
Colin Cross463a90e2015-06-17 14:20:06 -0700199 "soong",
Colin Cross635c3b02016-05-18 15:37:25 -0700200 "soong-android",
Colin Cross0607cf72015-04-28 13:28:51 -0700201 "soong-genrule",
Colin Cross3e3e72d2017-06-22 17:20:19 -0700202 "soong-java-config",
Colin Cross2fe66872015-03-30 17:20:39 -0700203 ],
204 srcs: [
Dan Willemsen218f6562015-07-08 18:13:11 -0700205 "java/androidmk.go",
Colin Cross30e076a2015-04-13 13:58:27 -0700206 "java/app_builder.go",
207 "java/app.go",
Colin Cross2fe66872015-03-30 17:20:39 -0700208 "java/builder.go",
Colin Crossc0b06f12015-04-08 13:03:43 -0700209 "java/gen.go",
Colin Cross2fe66872015-03-30 17:20:39 -0700210 "java/java.go",
211 "java/resources.go",
212 ],
Colin Cross72bb3632017-07-13 16:23:21 -0700213 testSrcs: [
214 "java/java_test.go",
215 ],
Dan Willemsen98b26c52015-07-27 15:08:24 -0700216 pluginFor: ["soong_build"],
Colin Cross2fe66872015-03-30 17:20:39 -0700217}
218
Nan Zhangdb0b9a32017-02-27 10:12:13 -0800219bootstrap_go_package {
Colin Cross3e3e72d2017-06-22 17:20:19 -0700220 name: "soong-java-config",
221 pkgPath: "android/soong/java/config",
222 deps: [
223 "blueprint-proptools",
224 "soong-android",
225 ],
226 srcs: [
227 "java/config/config.go",
Colin Crossfee57cb2017-09-05 13:16:45 -0700228 "java/config/error_prone.go",
Colin Cross3e3e72d2017-06-22 17:20:19 -0700229 "java/config/makevars.go",
230 ],
231}
232
233bootstrap_go_package {
Nan Zhangdb0b9a32017-02-27 10:12:13 -0800234 name: "soong-python",
235 pkgPath: "android/soong/python",
236 deps: [
237 "blueprint",
238 "soong-android",
239 ],
240 srcs: [
Nan Zhang5323f8e2017-05-10 13:37:54 -0700241 "python/androidmk.go",
Nan Zhangdb0b9a32017-02-27 10:12:13 -0800242 "python/binary.go",
243 "python/builder.go",
Nan Zhanga3fc4ba2017-07-20 17:43:37 -0700244 "python/defaults.go",
Nan Zhang5323f8e2017-05-10 13:37:54 -0700245 "python/installer.go",
Nan Zhangdb0b9a32017-02-27 10:12:13 -0800246 "python/library.go",
247 "python/python.go",
Nan Zhang5323f8e2017-05-10 13:37:54 -0700248 "python/test.go",
Nan Zhangdb0b9a32017-02-27 10:12:13 -0800249 ],
250 testSrcs: [
251 "python/python_test.go",
252 ],
253 pluginFor: ["soong_build"],
254}
255
Jeff Gastonefc1b412017-03-29 17:29:06 -0700256bootstrap_go_package {
257 name: "soong-shared",
258 pkgPath: "android/soong/shared",
259 srcs: [
260 "shared/paths.go",
261 ],
262}
263
Colin Cross80031312015-03-14 14:28:22 -0700264//
Dan Willemsen00fcbde2016-11-17 00:25:59 -0800265// Defaults to enable various configurations of host bionic
266//
267
268cc_defaults {
269 name: "linux_bionic_supported",
270 host_supported: true,
271 target: {
272 host: {
273 enabled: false,
274 },
275 linux_bionic: {
276 enabled: true,
277 },
278 },
279}
280
281//
Colin Cross80031312015-03-14 14:28:22 -0700282// C static libraries extracted from the gcc toolchain
283//
284
Colin Crossba442872015-03-14 14:26:32 -0700285toolchain_library {
286 name: "libatomic",
Dan Willemsen2e47b342016-11-17 01:02:25 -0800287 defaults: ["linux_bionic_supported"],
Dan Willemsen4416e5d2017-04-06 12:43:22 -0700288 vendor_available: true,
Dan Willemseneba363e2015-07-08 18:11:14 -0700289 arch: {
290 arm: {
291 instruction_set: "arm",
292 },
293 },
Colin Crossba442872015-03-14 14:26:32 -0700294}
Colin Cross3f40fa42015-01-30 17:27:36 -0800295
Colin Crossba442872015-03-14 14:26:32 -0700296toolchain_library {
297 name: "libgcc",
Dan Willemsen2e47b342016-11-17 01:02:25 -0800298 defaults: ["linux_bionic_supported"],
Dan Willemsen4416e5d2017-04-06 12:43:22 -0700299 vendor_available: true,
Dan Willemseneba363e2015-07-08 18:11:14 -0700300 arch: {
301 arm: {
302 instruction_set: "arm",
303 },
304 },
Colin Crossba442872015-03-14 14:26:32 -0700305}
Colin Cross3f40fa42015-01-30 17:27:36 -0800306
Colin Crossba442872015-03-14 14:26:32 -0700307toolchain_library {
Josh Gao7bd4c5c2017-02-23 17:52:24 -0800308 name: "libwinpthread",
309 host_supported: true,
310 enabled: false,
311 target: {
312 windows: {
Dan Willemsenc77a0b32017-09-18 23:19:12 -0700313 enabled: true,
Josh Gao7bd4c5c2017-02-23 17:52:24 -0800314 },
315 },
316}
317
318toolchain_library {
Colin Crossba442872015-03-14 14:26:32 -0700319 name: "libgcov",
Dan Willemsen2e47b342016-11-17 01:02:25 -0800320 defaults: ["linux_bionic_supported"],
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}
Jiyong Parkd773eb32017-07-03 13:18:12 +0900327
328kernel_headers {
329 name: "device_kernel_headers",
330 vendor: true,
331}
Dan Willemsenc77a0b32017-09-18 23:19:12 -0700332
333cc_genrule {
334 name: "host_bionic_linker_asm",
335 host_supported: true,
336 device_supported: false,
337 target: {
338 linux_bionic: {
339 enabled: true,
340 },
341 linux: {
342 enabled: false,
343 },
344 darwin: {
345 enabled: false,
346 },
347 },
348 tools: ["extract_linker"],
349 cmd: "$(location) -s $(out) $(in)",
350 srcs: [":linker"],
351 out: ["linker.s"],
352}
353
354cc_genrule {
355 name: "host_bionic_linker_script",
356 host_supported: true,
357 device_supported: false,
358 target: {
359 linux_bionic: {
360 enabled: true,
361 },
362 linux: {
363 enabled: false,
364 },
365 darwin: {
366 enabled: false,
367 },
368 },
369 tools: ["extract_linker"],
370 cmd: "$(location) -T $(out) $(in)",
371 srcs: [":linker"],
372 out: ["linker.script"],
373}