blob: 71345911296ea2e76f93387f7c4bb9d5cc9faed6 [file] [log] [blame]
Bob Badour02040de2021-02-03 18:08:28 -08001package {
2 default_applicable_licenses: ["Android-Apache-2.0"],
Cole Faust16d227a2024-09-18 16:42:01 -07003 default_visibility: [
4 "//build/soong:__subpackages__",
5 ],
Colin Crossb34ca772024-09-26 11:37:10 -07006 default_team: "trendy_team_build",
Bob Badour02040de2021-02-03 18:08:28 -08007}
8
Dan Willemsen377737a2016-08-15 15:02:23 -07009subdirs = [
10 "androidmk",
Jeff Gastonaff66e52017-06-19 15:39:54 -070011 "bpfix",
Dan Willemsen377737a2016-08-15 15:02:23 -070012 "cmd/*",
Jeff Gastonf1fd45e2017-08-09 18:25:28 -070013 "fs",
14 "finder",
Jeff Gaston01547b22017-08-21 20:13:28 -070015 "jar",
Jeff Gaston11b5c512017-10-12 12:19:14 -070016 "zip",
Dan Willemsen377737a2016-08-15 15:02:23 -070017 "third_party/zip",
Dan Willemsen1e704462016-08-21 15:17:17 -070018 "ui/*",
Dan Willemsen377737a2016-08-15 15:02:23 -070019]
Colin Cross68f55102015-03-25 14:43:57 -070020
21bootstrap_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 ],
Cole Faust16d227a2024-09-18 16:42:01 -070030 // Used by plugins, though probably shouldn't be.
31 visibility: ["//visibility:public"],
Colin Cross463a90e2015-06-17 14:20:06 -070032}
33
Colin Cross80031312015-03-14 14:28:22 -070034//
Dan Willemsen00fcbde2016-11-17 00:25:59 -080035// 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 },
Cole Faust16d227a2024-09-18 16:42:01 -070049 defaults_visibility: ["//visibility:public"],
Dan Willemsen00fcbde2016-11-17 00:25:59 -080050}
51
52//
Colin Cross80031312015-03-14 14:28:22 -070053// C static libraries extracted from the gcc toolchain
54//
55
Jiyong Parkd773eb32017-07-03 13:18:12 +090056kernel_headers {
57 name: "device_kernel_headers",
58 vendor: true,
Hridya Valsarajud61df502018-08-21 15:51:20 -070059 recovery_available: true,
Daniel Normanca2ed382022-03-04 18:45:52 +000060 min_sdk_version: "apex_inherit",
Cole Faust16d227a2024-09-18 16:42:01 -070061 visibility: ["//visibility:public"],
Jiyong Parkd773eb32017-07-03 13:18:12 +090062}
Dan Willemsenc77a0b32017-09-18 23:19:12 -070063
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 },
Colin Cross5b588dd2022-03-29 20:46:45 -070072 linux_musl: {
73 enabled: false,
74 },
Dan Willemsen9d6c6722017-10-02 10:41:07 -070075 linux_glibc: {
Dan Willemsenc77a0b32017-09-18 23:19:12 -070076 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"],
Cole Faust16d227a2024-09-18 16:42:01 -070086 visibility: ["//bionic/libc"],
Dan Willemsenc77a0b32017-09-18 23:19:12 -070087}
88
89cc_genrule {
Colin Cross9cfe6112021-06-11 18:02:22 -070090 name: "host_bionic_linker_script",
Dan Willemsenc77a0b32017-09-18 23:19:12 -070091 host_supported: true,
92 device_supported: false,
93 target: {
94 linux_bionic: {
95 enabled: true,
96 },
Colin Cross5b588dd2022-03-29 20:46:45 -070097 linux_musl: {
98 enabled: false,
99 },
Dan Willemsen9d6c6722017-10-02 10:41:07 -0700100 linux_glibc: {
Dan Willemsenc77a0b32017-09-18 23:19:12 -0700101 enabled: false,
102 },
103 darwin: {
104 enabled: false,
105 },
106 },
107 tools: ["extract_linker"],
Colin Cross9cfe6112021-06-11 18:02:22 -0700108 cmd: "$(location) -T $(out) $(in)",
Dan Willemsenc77a0b32017-09-18 23:19:12 -0700109 srcs: [":linker"],
Colin Cross9cfe6112021-06-11 18:02:22 -0700110 out: ["linker.script"],
Cole Faust16d227a2024-09-18 16:42:01 -0700111 visibility: ["//visibility:public"],
Dan Willemsenc77a0b32017-09-18 23:19:12 -0700112}
Paul Duffin1ab61862021-01-20 17:44:53 +0000113
114// Instantiate the dex_bootjars singleton module.
115dex_bootjars {
116 name: "dex_bootjars",
Cole Faust16d227a2024-09-18 16:42:01 -0700117 visibility: ["//visibility:public"],
Paul Duffin1ab61862021-01-20 17:44:53 +0000118}
Pirama Arumuga Nainar2558ce32021-06-24 15:59:38 -0700119
Spandan Das38b4c942024-09-18 18:58:41 +0000120art_boot_images {
121 name: "art_boot_images",
122 visibility: ["//art:__subpackages__"],
123}
124
Pirama Arumuga Nainar2558ce32021-06-24 15:59:38 -0700125// 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}
Jiakai Zhang0a0a2fb2021-09-30 09:38:19 +0000134
135dexpreopt_systemserver_check {
136 name: "dexpreopt_systemserver_check",
137}
Inseob Kim4f1f3d92022-04-25 18:23:58 +0900138
Spandan Dase3fcb412023-10-26 20:48:02 +0000139// container for apex_contributions selected using build flags
140all_apex_contributions {
141 name: "all_apex_contributions",
Cole Faust16d227a2024-09-18 16:42:01 -0700142 visibility: ["//visibility:public"],
Spandan Dase3fcb412023-10-26 20:48:02 +0000143}
Inseob Kim58c802f2024-06-11 10:59:00 +0900144
Pierre-Clément Tosid3bd6b42024-10-02 15:06:51 +0100145// 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",
Pierre-Clément Tosifece0082025-02-14 02:40:43 -0800150 arch: {
151 arm64: {
152 cflags: [
Krzysztof Kosiński6a30c612025-02-20 10:02:39 +0000153 // Override the global -march= flag (as set by TARGET_ARCH_VARIANT)
154 // and explicitly use the baseline architecture (ARMv8-A is the first
155 // version with 64-bit support) to avoid emitting potentially
156 // unsupported instructions.
157 "-march=armv8-a",
Pierre-Clément Tosifece0082025-02-14 02:40:43 -0800158 ],
159 },
160 },
Pierre-Clément Tosid3bd6b42024-10-02 15:06:51 +0100161 defaults_visibility: ["//visibility:public"],
162}
163
Inseob Kim58c802f2024-06-11 10:59:00 +0900164product_config {
165 name: "product_config",
Justin Yun7b534d52024-09-12 18:12:04 +0900166 visibility: [
167 "//build/make/target/product/generic",
Spandan Das168098c2024-10-28 19:44:34 +0000168 "//build/soong/fsgen",
Justin Yun7b534d52024-09-12 18:12:04 +0900169 ],
Inseob Kim58c802f2024-06-11 10:59:00 +0900170}
Inseob Kimbc4ef222024-07-31 02:00:41 +0000171
172build_prop {
173 name: "system-build.prop",
174 stem: "build.prop",
175 product_config: ":product_config",
Nick Chalko97e21a92024-11-13 10:20:48 -0800176 footer_files: [
177 ":applied_backported_fixes",
178 ],
Cole Fauste24abbf2025-03-05 12:53:35 -0800179 dist: {
180 targets: [
181 "droidcore-unbundled",
182 "sdk",
183 ],
184 },
John Wu9e0062b2024-10-15 08:56:07 +0000185 // Currently, only microdroid, Ravenwood, and cf system image can refer to system-build.prop
Inseob Kimbc4ef222024-07-31 02:00:41 +0000186 visibility: [
Jihoon Kangefd04b92024-12-10 23:35:09 +0000187 "//build/soong/fsgen",
Inseob Kimbc4ef222024-07-31 02:00:41 +0000188 "//packages/modules/Virtualization/build/microdroid",
John Wu9e0062b2024-10-15 08:56:07 +0000189 "//frameworks/base/ravenwood",
Kiyoung Kim78e6c8e2025-01-22 20:09:53 -0800190 "//visibility:any_system_partition",
Inseob Kimbc4ef222024-07-31 02:00:41 +0000191 ],
192}
Inseob Kimacf91742024-08-05 12:51:05 +0900193
194build_prop {
195 name: "system_ext-build.prop",
196 stem: "build.prop",
197 system_ext_specific: true,
198 product_config: ":product_config",
199 relative_install_path: "etc", // system_ext/etc/build.prop
Cole Fauste24abbf2025-03-05 12:53:35 -0800200 dist: {
201 targets: ["droidcore-unbundled"],
202 dest: "build.prop-system_ext",
203 },
Jihoon Kangefd04b92024-12-10 23:35:09 +0000204 visibility: [
205 "//build/make/target/product/gsi",
206 "//build/soong/fsgen",
207 ],
Inseob Kimacf91742024-08-05 12:51:05 +0900208}
Inseob Kim01d4f8b2024-08-08 17:47:14 +0900209
210build_prop {
211 name: "product-build.prop",
212 stem: "build.prop",
213 product_specific: true,
214 product_config: ":product_config",
215 relative_install_path: "etc", // product/etc/build.prop
Cole Fauste24abbf2025-03-05 12:53:35 -0800216 dist: {
217 targets: ["droidcore-unbundled"],
218 dest: "build.prop-product",
219 },
Jihoon Kangefd04b92024-12-10 23:35:09 +0000220 visibility: [
221 "//build/make/target/product/gsi",
222 "//build/soong/fsgen",
223 ],
Inseob Kim01d4f8b2024-08-08 17:47:14 +0900224}
225
226build_prop {
227 name: "odm-build.prop",
228 stem: "build.prop",
229 device_specific: true,
230 product_config: ":product_config",
231 relative_install_path: "etc", // odm/etc/build.prop
Cole Fauste24abbf2025-03-05 12:53:35 -0800232 dist: {
233 targets: ["droidcore-unbundled"],
234 dest: "build.prop-odm",
235 },
Jihoon Kangefd04b92024-12-10 23:35:09 +0000236 visibility: ["//build/soong/fsgen"],
Inseob Kim01d4f8b2024-08-08 17:47:14 +0900237}
Spandan Dasb9cef3b2024-11-06 22:08:28 +0000238
239build_prop {
240 name: "system_dlkm-build.prop",
241 stem: "build.prop",
242 system_dlkm_specific: true,
243 product_config: ":product_config",
244 relative_install_path: "etc", // system_dlkm/etc/build.prop
245 visibility: ["//visibility:private"],
246}
247
248build_prop {
249 name: "vendor_dlkm-build.prop",
250 stem: "build.prop",
251 vendor_dlkm_specific: true,
252 product_config: ":product_config",
253 relative_install_path: "etc", // vendor_dlkm/etc/build.prop
254 visibility: ["//visibility:private"],
255}
256
257build_prop {
258 name: "odm_dlkm-build.prop",
259 stem: "build.prop",
260 odm_dlkm_specific: true,
261 product_config: ":product_config",
262 relative_install_path: "etc", // odm_dlkm/etc/build.prop
263 visibility: ["//visibility:private"],
264}
Cole Faust4385d352024-11-12 15:13:37 -0800265
266build_prop {
267 name: "ramdisk-build.prop",
268 stem: "build.prop",
269 ramdisk: true,
270 product_config: ":product_config",
271 relative_install_path: "etc/ramdisk", // ramdisk/system/etc/ramdisk/build.prop
Cole Fauste24abbf2025-03-05 12:53:35 -0800272 dist: {
273 targets: ["droidcore-unbundled"],
274 dest: "build.prop-ramdisk",
275 },
Cole Faust4385d352024-11-12 15:13:37 -0800276 visibility: ["//visibility:private"],
277}
Spandan Das7701d5f2024-12-17 17:52:26 +0000278
279all_apex_certs {
280 name: "all_apex_certs",
Spandan Dasef1a1fd2025-01-03 19:43:38 +0000281 visibility: [
282 "//cts/tests/tests/security",
283 "//cts/hostsidetests/appsecurity",
284 ],
Spandan Das7701d5f2024-12-17 17:52:26 +0000285}