xref: /aosp_15_r20/build/soong/Android.bp (revision 333d2b3687b3a337dbcca9d65000bca186795e39)
1package {
2    default_applicable_licenses: ["Android-Apache-2.0"],
3    default_visibility: [
4        "//build/soong:__subpackages__",
5    ],
6    default_team: "trendy_team_build",
7}
8
9subdirs = [
10    "androidmk",
11    "bpfix",
12    "cmd/*",
13    "fs",
14    "finder",
15    "jar",
16    "zip",
17    "third_party/zip",
18    "ui/*",
19]
20
21bootstrap_go_package {
22    name: "soong",
23    pkgPath: "android/soong",
24    deps: [
25        "blueprint",
26    ],
27    srcs: [
28        "doc.go",
29    ],
30    // Used by plugins, though probably shouldn't be.
31    visibility: ["//visibility:public"],
32}
33
34//
35// Defaults to enable various configurations of host bionic
36//
37
38cc_defaults {
39    name: "linux_bionic_supported",
40    host_supported: true,
41    target: {
42        host: {
43            enabled: false,
44        },
45        linux_bionic: {
46            enabled: true,
47        },
48    },
49    defaults_visibility: ["//visibility:public"],
50}
51
52//
53// C static libraries extracted from the gcc toolchain
54//
55
56kernel_headers {
57    name: "device_kernel_headers",
58    vendor: true,
59    recovery_available: true,
60    min_sdk_version: "apex_inherit",
61    visibility: ["//visibility:public"],
62}
63
64cc_genrule {
65    name: "host_bionic_linker_asm",
66    host_supported: true,
67    device_supported: false,
68    target: {
69        linux_bionic: {
70            enabled: true,
71        },
72        linux_musl: {
73            enabled: false,
74        },
75        linux_glibc: {
76            enabled: false,
77        },
78        darwin: {
79            enabled: false,
80        },
81    },
82    tools: ["extract_linker"],
83    cmd: "$(location) -s $(out) $(in)",
84    srcs: [":linker"],
85    out: ["linker.s"],
86    visibility: ["//bionic/libc"],
87}
88
89cc_genrule {
90    name: "host_bionic_linker_script",
91    host_supported: true,
92    device_supported: false,
93    target: {
94        linux_bionic: {
95            enabled: true,
96        },
97        linux_musl: {
98            enabled: false,
99        },
100        linux_glibc: {
101            enabled: false,
102        },
103        darwin: {
104            enabled: false,
105        },
106    },
107    tools: ["extract_linker"],
108    cmd: "$(location) -T $(out) $(in)",
109    srcs: [":linker"],
110    out: ["linker.script"],
111    visibility: ["//visibility:public"],
112}
113
114// Instantiate the dex_bootjars singleton module.
115dex_bootjars {
116    name: "dex_bootjars",
117    visibility: ["//visibility:public"],
118}
119
120art_boot_images {
121    name: "art_boot_images",
122    visibility: ["//art:__subpackages__"],
123}
124
125// Pseudo-test that's run on checkbuilds to ensure that get_clang_version can
126// parse cc/config/global.go.
127genrule {
128    name: "get_clang_version_test",
129    cmd: "$(location get_clang_version) > $(out)",
130    tools: ["get_clang_version"],
131    srcs: ["cc/config/global.go"],
132    out: ["clang-prebuilts-version.txt"],
133}
134
135dexpreopt_systemserver_check {
136    name: "dexpreopt_systemserver_check",
137}
138
139// container for apex_contributions selected using build flags
140all_apex_contributions {
141    name: "all_apex_contributions",
142    visibility: ["//visibility:public"],
143}
144
145// Defaults to share configs between "baremetal" Soong modules, currently only
146// used for code running in kernel context within Android Virtualization
147// Framework guests.
148cc_defaults {
149    name: "cc_baremetal_defaults",
150    arch: {
151        arm64: {
152            cflags: [
153                // Prevent the compiler from optimizing code using SVE, as the
154                // baremetal environment might not have configured the hardware.
155                "-Xclang -target-feature",
156                "-Xclang -sve",
157            ],
158        },
159    },
160    defaults_visibility: ["//visibility:public"],
161}
162
163product_config {
164    name: "product_config",
165    visibility: [
166        "//build/make/target/product/generic",
167        "//build/soong/fsgen",
168    ],
169}
170
171build_prop {
172    name: "system-build.prop",
173    stem: "build.prop",
174    product_config: ":product_config",
175    footer_files: [
176        ":applied_backported_fixes",
177    ],
178    // Currently, only microdroid, Ravenwood, and cf system image can refer to system-build.prop
179    visibility: [
180        "//build/make/target/product/generic",
181        "//build/make/target/product/gsi",
182        "//packages/modules/Virtualization/build/microdroid",
183        "//frameworks/base/ravenwood",
184    ],
185}
186
187build_prop {
188    name: "system_ext-build.prop",
189    stem: "build.prop",
190    system_ext_specific: true,
191    product_config: ":product_config",
192    relative_install_path: "etc", // system_ext/etc/build.prop
193    visibility: ["//build/make/target/product/gsi"],
194}
195
196build_prop {
197    name: "product-build.prop",
198    stem: "build.prop",
199    product_specific: true,
200    product_config: ":product_config",
201    relative_install_path: "etc", // product/etc/build.prop
202    visibility: ["//build/make/target/product/gsi"],
203}
204
205build_prop {
206    name: "odm-build.prop",
207    stem: "build.prop",
208    device_specific: true,
209    product_config: ":product_config",
210    relative_install_path: "etc", // odm/etc/build.prop
211    visibility: ["//visibility:private"],
212}
213
214build_prop {
215    name: "system_dlkm-build.prop",
216    stem: "build.prop",
217    system_dlkm_specific: true,
218    product_config: ":product_config",
219    relative_install_path: "etc", // system_dlkm/etc/build.prop
220    visibility: ["//visibility:private"],
221}
222
223build_prop {
224    name: "vendor_dlkm-build.prop",
225    stem: "build.prop",
226    vendor_dlkm_specific: true,
227    product_config: ":product_config",
228    relative_install_path: "etc", // vendor_dlkm/etc/build.prop
229    visibility: ["//visibility:private"],
230}
231
232build_prop {
233    name: "odm_dlkm-build.prop",
234    stem: "build.prop",
235    odm_dlkm_specific: true,
236    product_config: ":product_config",
237    relative_install_path: "etc", // odm_dlkm/etc/build.prop
238    visibility: ["//visibility:private"],
239}
240
241build_prop {
242    name: "ramdisk-build.prop",
243    stem: "build.prop",
244    ramdisk: true,
245    product_config: ":product_config",
246    relative_install_path: "etc/ramdisk", // ramdisk/system/etc/ramdisk/build.prop
247    visibility: ["//visibility:private"],
248}
249