• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1subdirs = [
2    "androidmk",
3    "bpfix",
4    "cmd/*",
5    "fs",
6    "finder",
7    "jar",
8    "zip",
9    "third_party/zip",
10    "ui/*",
11]
12
13bootstrap_go_package {
14    name: "soong-env",
15    pkgPath: "android/soong/env",
16    srcs: [
17        "env/env.go",
18    ],
19}
20
21bootstrap_go_package {
22    name: "soong",
23    pkgPath: "android/soong",
24    deps: [
25        "blueprint",
26    ],
27    srcs: [
28        "doc.go",
29    ],
30}
31
32bootstrap_go_package {
33    name: "soong-android",
34    pkgPath: "android/soong/android",
35    deps: [
36        "blueprint",
37        "blueprint-bootstrap",
38        "soong",
39        "soong-env",
40    ],
41    srcs: [
42        "android/androidmk.go",
43        "android/apex.go",
44        "android/api_levels.go",
45        "android/arch.go",
46        "android/config.go",
47        "android/defaults.go",
48        "android/defs.go",
49        "android/expand.go",
50        "android/filegroup.go",
51        "android/hooks.go",
52        "android/makevars.go",
53        "android/module.go",
54        "android/mutator.go",
55        "android/namespace.go",
56        "android/neverallow.go",
57        "android/notices.go",
58        "android/onceper.go",
59        "android/override_module.go",
60        "android/package_ctx.go",
61        "android/path_properties.go",
62        "android/paths.go",
63        "android/prebuilt.go",
64        "android/prebuilt_etc.go",
65        "android/proto.go",
66        "android/register.go",
67        "android/rule_builder.go",
68        "android/sh_binary.go",
69        "android/singleton.go",
70        "android/testing.go",
71        "android/util.go",
72        "android/variable.go",
73        "android/vts_config.go",
74        "android/writedocs.go",
75
76        // Lock down environment access last
77        "android/env.go",
78    ],
79    testSrcs: [
80        "android/arch_test.go",
81        "android/config_test.go",
82        "android/expand_test.go",
83        "android/namespace_test.go",
84        "android/neverallow_test.go",
85        "android/onceper_test.go",
86        "android/path_properties_test.go",
87        "android/paths_test.go",
88        "android/prebuilt_test.go",
89        "android/prebuilt_etc_test.go",
90        "android/rule_builder_test.go",
91        "android/util_test.go",
92        "android/variable_test.go",
93        "android/vts_config_test.go",
94    ],
95}
96
97bootstrap_go_package {
98    name: "soong-cc-config",
99    pkgPath: "android/soong/cc/config",
100    deps: [
101        "soong-android",
102    ],
103    srcs: [
104        "cc/config/clang.go",
105        "cc/config/global.go",
106        "cc/config/tidy.go",
107        "cc/config/toolchain.go",
108        "cc/config/vndk.go",
109
110        "cc/config/arm_device.go",
111        "cc/config/arm64_device.go",
112        "cc/config/arm64_fuchsia_device.go",
113        "cc/config/mips_device.go",
114        "cc/config/mips64_device.go",
115        "cc/config/x86_device.go",
116        "cc/config/x86_64_device.go",
117        "cc/config/x86_64_fuchsia_device.go",
118
119        "cc/config/x86_darwin_host.go",
120        "cc/config/x86_linux_host.go",
121        "cc/config/x86_linux_bionic_host.go",
122        "cc/config/x86_windows_host.go",
123    ],
124    testSrcs: [
125        "cc/config/tidy_test.go",
126    ],
127}
128
129bootstrap_go_package {
130    name: "soong-cc",
131    pkgPath: "android/soong/cc",
132    deps: [
133        "blueprint",
134        "blueprint-pathtools",
135        "soong",
136        "soong-android",
137        "soong-cc-config",
138        "soong-genrule",
139        "soong-tradefed",
140    ],
141    srcs: [
142        "cc/androidmk.go",
143        "cc/builder.go",
144        "cc/cc.go",
145        "cc/check.go",
146        "cc/coverage.go",
147        "cc/gen.go",
148        "cc/lto.go",
149        "cc/makevars.go",
150        "cc/pgo.go",
151        "cc/prebuilt.go",
152        "cc/proto.go",
153        "cc/rs.go",
154        "cc/sanitize.go",
155        "cc/sabi.go",
156        "cc/stl.go",
157        "cc/strip.go",
158        "cc/sysprop.go",
159        "cc/tidy.go",
160        "cc/util.go",
161        "cc/vndk.go",
162        "cc/vndk_prebuilt.go",
163        "cc/xom.go",
164
165        "cc/cmakelists.go",
166        "cc/compdb.go",
167        "cc/compiler.go",
168        "cc/installer.go",
169        "cc/linker.go",
170
171        "cc/binary.go",
172        "cc/library.go",
173        "cc/object.go",
174        "cc/test.go",
175        "cc/toolchain_library.go",
176
177        "cc/ndk_prebuilt.go",
178        "cc/ndk_headers.go",
179        "cc/ndk_library.go",
180        "cc/ndk_sysroot.go",
181
182        "cc/llndk_library.go",
183
184        "cc/kernel_headers.go",
185
186        "cc/genrule.go",
187
188        "cc/vendor_public_library.go",
189
190        "cc/testing.go",
191    ],
192    testSrcs: [
193        "cc/cc_test.go",
194        "cc/gen_test.go",
195        "cc/genrule_test.go",
196        "cc/library_test.go",
197        "cc/prebuilt_test.go",
198        "cc/proto_test.go",
199        "cc/test_data_test.go",
200        "cc/util_test.go",
201    ],
202    pluginFor: ["soong_build"],
203}
204
205bootstrap_go_package {
206    name: "soong-genrule",
207    pkgPath: "android/soong/genrule",
208    deps: [
209        "blueprint",
210        "blueprint-pathtools",
211        "soong",
212        "soong-android",
213        "soong-shared",
214    ],
215    srcs: [
216        "genrule/genrule.go",
217    ],
218    testSrcs: [
219        "genrule/genrule_test.go",
220    ],
221    pluginFor: ["soong_build"],
222}
223
224bootstrap_go_package {
225    name: "soong-phony",
226    pkgPath: "android/soong/phony",
227    deps: [
228        "blueprint",
229        "soong-android",
230    ],
231    srcs: [
232        "phony/phony.go",
233    ],
234    pluginFor: ["soong_build"],
235}
236
237bootstrap_go_package {
238    name: "soong-java",
239    pkgPath: "android/soong/java",
240    deps: [
241        "blueprint",
242        "blueprint-pathtools",
243        "soong",
244        "soong-android",
245        "soong-cc",
246        "soong-dexpreopt",
247        "soong-genrule",
248        "soong-java-config",
249        "soong-tradefed",
250    ],
251    srcs: [
252        "java/aapt2.go",
253        "java/aar.go",
254        "java/android_manifest.go",
255        "java/android_resources.go",
256        "java/androidmk.go",
257        "java/app_builder.go",
258        "java/app.go",
259        "java/builder.go",
260        "java/device_host_converter.go",
261        "java/dex.go",
262        "java/dexpreopt.go",
263        "java/dexpreopt_bootjars.go",
264        "java/dexpreopt_config.go",
265        "java/droiddoc.go",
266        "java/gen.go",
267        "java/genrule.go",
268        "java/hiddenapi.go",
269        "java/hiddenapi_singleton.go",
270        "java/jacoco.go",
271        "java/java.go",
272        "java/jdeps.go",
273        "java/java_resources.go",
274        "java/kotlin.go",
275        "java/plugin.go",
276        "java/prebuilt_apis.go",
277        "java/proto.go",
278        "java/sdk.go",
279        "java/sdk_library.go",
280        "java/support_libraries.go",
281        "java/system_modules.go",
282        "java/testing.go",
283    ],
284    testSrcs: [
285        "java/app_test.go",
286        "java/device_host_converter_test.go",
287        "java/dexpreopt_test.go",
288        "java/dexpreopt_bootjars_test.go",
289        "java/java_test.go",
290        "java/jdeps_test.go",
291        "java/kotlin_test.go",
292        "java/plugin_test.go",
293        "java/sdk_test.go",
294    ],
295    pluginFor: ["soong_build"],
296}
297
298bootstrap_go_package {
299    name: "soong-java-config",
300    pkgPath: "android/soong/java/config",
301    deps: [
302        "blueprint-proptools",
303        "soong-android",
304    ],
305    srcs: [
306        "java/config/config.go",
307        "java/config/error_prone.go",
308        "java/config/kotlin.go",
309        "java/config/makevars.go",
310    ],
311}
312
313bootstrap_go_package {
314    name: "soong-python",
315    pkgPath: "android/soong/python",
316    deps: [
317        "blueprint",
318        "soong-android",
319        "soong-tradefed",
320    ],
321    srcs: [
322        "python/androidmk.go",
323        "python/binary.go",
324        "python/builder.go",
325        "python/defaults.go",
326        "python/installer.go",
327        "python/library.go",
328        "python/proto.go",
329        "python/python.go",
330        "python/test.go",
331    ],
332    testSrcs: [
333        "python/python_test.go",
334    ],
335    pluginFor: ["soong_build"],
336}
337
338bootstrap_go_package {
339    name: "soong-shared",
340    pkgPath: "android/soong/shared",
341    srcs: [
342        "shared/paths.go",
343    ],
344}
345
346bootstrap_go_package {
347    name: "soong-tradefed",
348    pkgPath: "android/soong/tradefed",
349    deps: [
350        "blueprint",
351        "soong-android",
352    ],
353    srcs: [
354        "tradefed/autogen.go",
355        "tradefed/config.go",
356        "tradefed/makevars.go",
357    ],
358    pluginFor: ["soong_build"],
359}
360
361bootstrap_go_package {
362    name: "soong-xml",
363    pkgPath: "android/soong/xml",
364    deps: [
365        "blueprint",
366        "blueprint-pathtools",
367        "soong",
368        "soong-android",
369    ],
370    srcs: [
371        "xml/xml.go",
372    ],
373    testSrcs: [
374        "xml/xml_test.go",
375    ],
376    pluginFor: ["soong_build"],
377}
378
379bootstrap_go_package {
380    name: "soong-apex",
381    pkgPath: "android/soong/apex",
382    deps: [
383        "blueprint",
384        "soong",
385        "soong-android",
386        "soong-cc",
387        "soong-java",
388        "soong-python",
389    ],
390    srcs: [
391        "apex/apex.go",
392        "apex/key.go",
393    ],
394    testSrcs: [
395        "apex/apex_test.go",
396    ],
397    pluginFor: ["soong_build"],
398}
399
400bootstrap_go_package {
401    name: "soong-sysprop",
402    pkgPath: "android/soong/sysprop",
403    deps: [
404        "blueprint",
405        "soong",
406        "soong-android",
407        "soong-cc",
408        "soong-java",
409    ],
410    srcs: [
411        "sysprop/sysprop_library.go",
412    ],
413    testSrcs: [
414        "sysprop/sysprop_test.go",
415    ],
416    pluginFor: ["soong_build"],
417}
418
419//
420// Defaults to enable various configurations of host bionic
421//
422
423cc_defaults {
424    name: "linux_bionic_supported",
425    host_supported: true,
426    target: {
427        host: {
428            enabled: false,
429        },
430        linux_bionic: {
431            enabled: true,
432        },
433    },
434}
435
436//
437// C static libraries extracted from the gcc toolchain
438//
439
440toolchain_library {
441    name: "libatomic",
442    defaults: ["linux_bionic_supported"],
443    vendor_available: true,
444    recovery_available: true,
445
446    arch: {
447        arm: {
448            src: "prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/arm-linux-androideabi/lib/libatomic.a",
449        },
450        arm64: {
451            src: "prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/lib64/libatomic.a",
452        },
453        x86: {
454            src: "prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9/x86_64-linux-android/lib/libatomic.a",
455        },
456        x86_64: {
457            src: "prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9/x86_64-linux-android/lib64/libatomic.a",
458        },
459    },
460}
461
462toolchain_library {
463    name: "libgcc",
464    defaults: ["linux_bionic_supported"],
465    vendor_available: true,
466    recovery_available: true,
467
468    arch: {
469        arm: {
470            src: "prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/lib/gcc/arm-linux-androideabi/4.9.x/libgcc.a",
471        },
472        arm64: {
473            src: "prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/lib/gcc/aarch64-linux-android/4.9.x/libgcc.a",
474        },
475        x86: {
476            src: "prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9/lib/gcc/x86_64-linux-android/4.9.x/32/libgcc.a",
477        },
478        x86_64: {
479            src: "prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9/lib/gcc/x86_64-linux-android/4.9.x/libgcc.a",
480        },
481    },
482}
483
484toolchain_library {
485    name: "libgcc_stripped",
486    defaults: ["linux_bionic_supported"],
487    vendor_available: true,
488    recovery_available: true,
489
490    arch: {
491        arm: {
492            src: "prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/lib/gcc/arm-linux-androideabi/4.9.x/libgcc.a",
493            strip: {
494                keep_symbols_list: [
495                    // unwind-arm.o
496                    "_Unwind_Complete",
497                    "_Unwind_DeleteException",
498                    "_Unwind_GetCFA",
499                    "_Unwind_VRS_Get",
500                    "_Unwind_VRS_Pop",
501                    "_Unwind_VRS_Set",
502                    "__aeabi_unwind_cpp_pr0",
503                    "__aeabi_unwind_cpp_pr1",
504                    "__aeabi_unwind_cpp_pr2",
505                    "__gnu_Unwind_Backtrace",
506                    "__gnu_Unwind_ForcedUnwind",
507                    "__gnu_Unwind_RaiseException",
508                    "__gnu_Unwind_Resume",
509                    "__gnu_Unwind_Resume_or_Rethrow",
510
511                    // libunwind.o
512                    "_Unwind_Backtrace",
513                    "_Unwind_ForcedUnwind",
514                    "_Unwind_RaiseException",
515                    "_Unwind_Resume",
516                    "_Unwind_Resume_or_Rethrow",
517                    "___Unwind_Backtrace",
518                    "___Unwind_ForcedUnwind",
519                    "___Unwind_RaiseException",
520                    "___Unwind_Resume",
521                    "___Unwind_Resume_or_Rethrow",
522                    "__gnu_Unwind_Restore_VFP",
523                    "__gnu_Unwind_Restore_VFP_D",
524                    "__gnu_Unwind_Restore_VFP_D_16_to_31",
525                    "__gnu_Unwind_Restore_WMMXC",
526                    "__gnu_Unwind_Restore_WMMXD",
527                    "__gnu_Unwind_Save_VFP",
528                    "__gnu_Unwind_Save_VFP_D",
529                    "__gnu_Unwind_Save_VFP_D_16_to_31",
530                    "__gnu_Unwind_Save_WMMXC",
531                    "__gnu_Unwind_Save_WMMXD",
532                    "__restore_core_regs",
533                    "restore_core_regs",
534
535                    // pr-support.o
536                    "_Unwind_GetDataRelBase",
537                    "_Unwind_GetLanguageSpecificData",
538                    "_Unwind_GetRegionStart",
539                    "_Unwind_GetTextRelBase",
540                    "__gnu_unwind_execute",
541                    "__gnu_unwind_frame",
542                ],
543                use_gnu_strip: true,
544            },
545        },
546        arm64: {
547            src: "prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/lib/gcc/aarch64-linux-android/4.9.x/libgcc.a",
548        },
549        x86: {
550            src: "prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9/lib/gcc/x86_64-linux-android/4.9.x/32/libgcc.a",
551
552        },
553        x86_64: {
554            src: "prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9/lib/gcc/x86_64-linux-android/4.9.x/libgcc.a",
555        },
556    },
557    strip: {
558        keep_symbols_list: [
559            // unwind-dw2.o
560            "_Unwind_Backtrace",
561            "_Unwind_DeleteException",
562            "_Unwind_FindEnclosingFunction",
563            "_Unwind_ForcedUnwind",
564            "_Unwind_GetCFA",
565            "_Unwind_GetDataRelBase",
566            "_Unwind_GetGR",
567            "_Unwind_GetIP",
568            "_Unwind_GetIPInfo",
569            "_Unwind_GetLanguageSpecificData",
570            "_Unwind_GetRegionStart",
571            "_Unwind_GetTextRelBase",
572            "_Unwind_RaiseException",
573            "_Unwind_Resume",
574            "_Unwind_Resume_or_Rethrow",
575            "_Unwind_SetGR",
576            "_Unwind_SetIP",
577            "__frame_state_for",
578
579            // unwind-dw2-fde-dip.o
580            "_Unwind_Find_FDE",
581            "__deregister_frame",
582            "__deregister_frame_info",
583            "__deregister_frame_info_bases",
584            "__register_frame",
585            "__register_frame_info",
586            "__register_frame_info_bases",
587            "__register_frame_info_table",
588            "__register_frame_info_table_bases",
589            "__register_frame_table",
590        ],
591        use_gnu_strip: true,
592    },
593}
594
595toolchain_library {
596    name: "libwinpthread",
597    host_supported: true,
598    enabled: false,
599    target: {
600        windows: {
601            enabled: true,
602        },
603        windows_x86: {
604            src: "prebuilts/gcc/linux-x86/host/x86_64-w64-mingw32-4.8/x86_64-w64-mingw32/lib32/libwinpthread.a",
605        },
606        windows_x86_64: {
607            src: "prebuilts/gcc/linux-x86/host/x86_64-w64-mingw32-4.8/x86_64-w64-mingw32/lib/libwinpthread.a",
608        },
609    },
610    notice: ":mingw-libwinpthread-notice",
611}
612
613toolchain_library {
614    name: "libgcov",
615    defaults: ["linux_bionic_supported"],
616
617    arch: {
618        arm: {
619            src: "prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/lib/gcc/arm-linux-androideabi/4.9.x/libgcov.a",
620        },
621        arm64: {
622            src: "prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/lib/gcc/aarch64-linux-android/4.9.x/libgcov.a",
623        },
624        x86: {
625            src: "prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9/lib/gcc/x86_64-linux-android/4.9.x/32/libgcov.a",
626        },
627        x86_64: {
628            src: "prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9/lib/gcc/x86_64-linux-android/4.9.x/libgcov.a",
629        },
630    },
631}
632
633kernel_headers {
634    name: "device_kernel_headers",
635    vendor: true,
636    recovery_available: true,
637}
638
639cc_genrule {
640    name: "host_bionic_linker_asm",
641    host_supported: true,
642    device_supported: false,
643    target: {
644        linux_bionic: {
645            enabled: true,
646        },
647        linux_glibc: {
648            enabled: false,
649        },
650        darwin: {
651            enabled: false,
652        },
653    },
654    tools: ["extract_linker"],
655    cmd: "$(location) -s $(out) $(in)",
656    srcs: [":linker"],
657    out: ["linker.s"],
658}
659
660cc_genrule {
661    name: "host_bionic_linker_flags",
662    host_supported: true,
663    device_supported: false,
664    target: {
665        linux_bionic: {
666            enabled: true,
667        },
668        linux_glibc: {
669            enabled: false,
670        },
671        darwin: {
672            enabled: false,
673        },
674    },
675    tools: ["extract_linker"],
676    cmd: "$(location) -f $(out) $(in)",
677    srcs: [":linker"],
678    out: ["linker.flags"],
679}
680