Bob Badour | 02040de | 2021-02-03 18:08:28 -0800 | [diff] [blame] | 1 | package { |
| 2 | default_applicable_licenses: ["Android-Apache-2.0"], |
Cole Faust | 16d227a | 2024-09-18 16:42:01 -0700 | [diff] [blame] | 3 | default_visibility: [ |
| 4 | "//build/soong:__subpackages__", |
| 5 | ], |
Colin Cross | b34ca77 | 2024-09-26 11:37:10 -0700 | [diff] [blame] | 6 | default_team: "trendy_team_build", |
Bob Badour | 02040de | 2021-02-03 18:08:28 -0800 | [diff] [blame] | 7 | } |
| 8 | |
Dan Willemsen | 377737a | 2016-08-15 15:02:23 -0700 | [diff] [blame] | 9 | subdirs = [ |
| 10 | "androidmk", |
Jeff Gaston | aff66e5 | 2017-06-19 15:39:54 -0700 | [diff] [blame] | 11 | "bpfix", |
Dan Willemsen | 377737a | 2016-08-15 15:02:23 -0700 | [diff] [blame] | 12 | "cmd/*", |
Jeff Gaston | f1fd45e | 2017-08-09 18:25:28 -0700 | [diff] [blame] | 13 | "fs", |
| 14 | "finder", |
Jeff Gaston | 01547b2 | 2017-08-21 20:13:28 -0700 | [diff] [blame] | 15 | "jar", |
Jeff Gaston | 11b5c51 | 2017-10-12 12:19:14 -0700 | [diff] [blame] | 16 | "zip", |
Dan Willemsen | 377737a | 2016-08-15 15:02:23 -0700 | [diff] [blame] | 17 | "third_party/zip", |
Dan Willemsen | 1e70446 | 2016-08-21 15:17:17 -0700 | [diff] [blame] | 18 | "ui/*", |
Dan Willemsen | 377737a | 2016-08-15 15:02:23 -0700 | [diff] [blame] | 19 | ] |
Colin Cross | 68f5510 | 2015-03-25 14:43:57 -0700 | [diff] [blame] | 20 | |
| 21 | bootstrap_go_package { |
Colin Cross | 463a90e | 2015-06-17 14:20:06 -0700 | [diff] [blame] | 22 | name: "soong", |
| 23 | pkgPath: "android/soong", |
| 24 | deps: [ |
| 25 | "blueprint", |
| 26 | ], |
| 27 | srcs: [ |
| 28 | "doc.go", |
Colin Cross | 463a90e | 2015-06-17 14:20:06 -0700 | [diff] [blame] | 29 | ], |
Cole Faust | 16d227a | 2024-09-18 16:42:01 -0700 | [diff] [blame] | 30 | // Used by plugins, though probably shouldn't be. |
| 31 | visibility: ["//visibility:public"], |
Colin Cross | 463a90e | 2015-06-17 14:20:06 -0700 | [diff] [blame] | 32 | } |
| 33 | |
Colin Cross | 8003131 | 2015-03-14 14:28:22 -0700 | [diff] [blame] | 34 | // |
Dan Willemsen | 00fcbde | 2016-11-17 00:25:59 -0800 | [diff] [blame] | 35 | // Defaults to enable various configurations of host bionic |
| 36 | // |
| 37 | |
| 38 | cc_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 Faust | 16d227a | 2024-09-18 16:42:01 -0700 | [diff] [blame] | 49 | defaults_visibility: ["//visibility:public"], |
Dan Willemsen | 00fcbde | 2016-11-17 00:25:59 -0800 | [diff] [blame] | 50 | } |
| 51 | |
| 52 | // |
Colin Cross | 8003131 | 2015-03-14 14:28:22 -0700 | [diff] [blame] | 53 | // C static libraries extracted from the gcc toolchain |
| 54 | // |
| 55 | |
Jiyong Park | d773eb3 | 2017-07-03 13:18:12 +0900 | [diff] [blame] | 56 | kernel_headers { |
| 57 | name: "device_kernel_headers", |
| 58 | vendor: true, |
Hridya Valsaraju | d61df50 | 2018-08-21 15:51:20 -0700 | [diff] [blame] | 59 | recovery_available: true, |
Daniel Norman | ca2ed38 | 2022-03-04 18:45:52 +0000 | [diff] [blame] | 60 | min_sdk_version: "apex_inherit", |
Cole Faust | 16d227a | 2024-09-18 16:42:01 -0700 | [diff] [blame] | 61 | visibility: ["//visibility:public"], |
Jiyong Park | d773eb3 | 2017-07-03 13:18:12 +0900 | [diff] [blame] | 62 | } |
Dan Willemsen | c77a0b3 | 2017-09-18 23:19:12 -0700 | [diff] [blame] | 63 | |
| 64 | cc_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 Cross | 5b588dd | 2022-03-29 20:46:45 -0700 | [diff] [blame] | 72 | linux_musl: { |
| 73 | enabled: false, |
| 74 | }, |
Dan Willemsen | 9d6c672 | 2017-10-02 10:41:07 -0700 | [diff] [blame] | 75 | linux_glibc: { |
Dan Willemsen | c77a0b3 | 2017-09-18 23:19:12 -0700 | [diff] [blame] | 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"], |
Cole Faust | 16d227a | 2024-09-18 16:42:01 -0700 | [diff] [blame] | 86 | visibility: ["//bionic/libc"], |
Dan Willemsen | c77a0b3 | 2017-09-18 23:19:12 -0700 | [diff] [blame] | 87 | } |
| 88 | |
| 89 | cc_genrule { |
Colin Cross | 9cfe611 | 2021-06-11 18:02:22 -0700 | [diff] [blame] | 90 | name: "host_bionic_linker_script", |
Dan Willemsen | c77a0b3 | 2017-09-18 23:19:12 -0700 | [diff] [blame] | 91 | host_supported: true, |
| 92 | device_supported: false, |
| 93 | target: { |
| 94 | linux_bionic: { |
| 95 | enabled: true, |
| 96 | }, |
Colin Cross | 5b588dd | 2022-03-29 20:46:45 -0700 | [diff] [blame] | 97 | linux_musl: { |
| 98 | enabled: false, |
| 99 | }, |
Dan Willemsen | 9d6c672 | 2017-10-02 10:41:07 -0700 | [diff] [blame] | 100 | linux_glibc: { |
Dan Willemsen | c77a0b3 | 2017-09-18 23:19:12 -0700 | [diff] [blame] | 101 | enabled: false, |
| 102 | }, |
| 103 | darwin: { |
| 104 | enabled: false, |
| 105 | }, |
| 106 | }, |
| 107 | tools: ["extract_linker"], |
Colin Cross | 9cfe611 | 2021-06-11 18:02:22 -0700 | [diff] [blame] | 108 | cmd: "$(location) -T $(out) $(in)", |
Dan Willemsen | c77a0b3 | 2017-09-18 23:19:12 -0700 | [diff] [blame] | 109 | srcs: [":linker"], |
Colin Cross | 9cfe611 | 2021-06-11 18:02:22 -0700 | [diff] [blame] | 110 | out: ["linker.script"], |
Cole Faust | 16d227a | 2024-09-18 16:42:01 -0700 | [diff] [blame] | 111 | visibility: ["//visibility:public"], |
Dan Willemsen | c77a0b3 | 2017-09-18 23:19:12 -0700 | [diff] [blame] | 112 | } |
Paul Duffin | 1ab6186 | 2021-01-20 17:44:53 +0000 | [diff] [blame] | 113 | |
| 114 | // Instantiate the dex_bootjars singleton module. |
| 115 | dex_bootjars { |
| 116 | name: "dex_bootjars", |
Cole Faust | 16d227a | 2024-09-18 16:42:01 -0700 | [diff] [blame] | 117 | visibility: ["//visibility:public"], |
Paul Duffin | 1ab6186 | 2021-01-20 17:44:53 +0000 | [diff] [blame] | 118 | } |
Pirama Arumuga Nainar | 2558ce3 | 2021-06-24 15:59:38 -0700 | [diff] [blame] | 119 | |
Spandan Das | 38b4c94 | 2024-09-18 18:58:41 +0000 | [diff] [blame] | 120 | art_boot_images { |
| 121 | name: "art_boot_images", |
| 122 | visibility: ["//art:__subpackages__"], |
| 123 | } |
| 124 | |
Pirama Arumuga Nainar | 2558ce3 | 2021-06-24 15:59:38 -0700 | [diff] [blame] | 125 | // Pseudo-test that's run on checkbuilds to ensure that get_clang_version can |
| 126 | // parse cc/config/global.go. |
| 127 | genrule { |
| 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 Zhang | 0a0a2fb | 2021-09-30 09:38:19 +0000 | [diff] [blame] | 134 | |
| 135 | dexpreopt_systemserver_check { |
| 136 | name: "dexpreopt_systemserver_check", |
| 137 | } |
Inseob Kim | 4f1f3d9 | 2022-04-25 18:23:58 +0900 | [diff] [blame] | 138 | |
Spandan Das | e3fcb41 | 2023-10-26 20:48:02 +0000 | [diff] [blame] | 139 | // container for apex_contributions selected using build flags |
| 140 | all_apex_contributions { |
| 141 | name: "all_apex_contributions", |
Cole Faust | 16d227a | 2024-09-18 16:42:01 -0700 | [diff] [blame] | 142 | visibility: ["//visibility:public"], |
Spandan Das | e3fcb41 | 2023-10-26 20:48:02 +0000 | [diff] [blame] | 143 | } |
Inseob Kim | 58c802f | 2024-06-11 10:59:00 +0900 | [diff] [blame] | 144 | |
Pierre-Clément Tosi | d3bd6b4 | 2024-10-02 15:06:51 +0100 | [diff] [blame] | 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. |
| 148 | cc_defaults { |
| 149 | name: "cc_baremetal_defaults", |
Pierre-Clément Tosi | 12d548a | 2024-10-02 15:59:29 +0100 | [diff] [blame] | 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 | }, |
Pierre-Clément Tosi | d3bd6b4 | 2024-10-02 15:06:51 +0100 | [diff] [blame] | 160 | defaults_visibility: ["//visibility:public"], |
| 161 | } |
| 162 | |
Inseob Kim | 58c802f | 2024-06-11 10:59:00 +0900 | [diff] [blame] | 163 | product_config { |
| 164 | name: "product_config", |
Justin Yun | 7b534d5 | 2024-09-12 18:12:04 +0900 | [diff] [blame] | 165 | visibility: [ |
| 166 | "//build/make/target/product/generic", |
Spandan Das | 168098c | 2024-10-28 19:44:34 +0000 | [diff] [blame] | 167 | "//build/soong/fsgen", |
Justin Yun | 7b534d5 | 2024-09-12 18:12:04 +0900 | [diff] [blame] | 168 | ], |
Inseob Kim | 58c802f | 2024-06-11 10:59:00 +0900 | [diff] [blame] | 169 | } |
Inseob Kim | bc4ef22 | 2024-07-31 02:00:41 +0000 | [diff] [blame] | 170 | |
| 171 | build_prop { |
| 172 | name: "system-build.prop", |
| 173 | stem: "build.prop", |
| 174 | product_config: ":product_config", |
Nick Chalko | 97e21a9 | 2024-11-13 10:20:48 -0800 | [diff] [blame] | 175 | footer_files: [ |
| 176 | ":applied_backported_fixes", |
| 177 | ], |
John Wu | 9e0062b | 2024-10-15 08:56:07 +0000 | [diff] [blame] | 178 | // Currently, only microdroid, Ravenwood, and cf system image can refer to system-build.prop |
Inseob Kim | bc4ef22 | 2024-07-31 02:00:41 +0000 | [diff] [blame] | 179 | visibility: [ |
Justin Yun | 7b534d5 | 2024-09-12 18:12:04 +0900 | [diff] [blame] | 180 | "//build/make/target/product/generic", |
Inseob Kim | 3c0a042 | 2024-11-05 17:21:37 +0900 | [diff] [blame] | 181 | "//build/make/target/product/gsi", |
Inseob Kim | bc4ef22 | 2024-07-31 02:00:41 +0000 | [diff] [blame] | 182 | "//packages/modules/Virtualization/build/microdroid", |
John Wu | 9e0062b | 2024-10-15 08:56:07 +0000 | [diff] [blame] | 183 | "//frameworks/base/ravenwood", |
Inseob Kim | bc4ef22 | 2024-07-31 02:00:41 +0000 | [diff] [blame] | 184 | ], |
| 185 | } |
Inseob Kim | acf9174 | 2024-08-05 12:51:05 +0900 | [diff] [blame] | 186 | |
| 187 | build_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 |
Inseob Kim | 3c0a042 | 2024-11-05 17:21:37 +0900 | [diff] [blame] | 193 | visibility: ["//build/make/target/product/gsi"], |
Inseob Kim | acf9174 | 2024-08-05 12:51:05 +0900 | [diff] [blame] | 194 | } |
Inseob Kim | 01d4f8b | 2024-08-08 17:47:14 +0900 | [diff] [blame] | 195 | |
| 196 | build_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 |
Inseob Kim | 3c0a042 | 2024-11-05 17:21:37 +0900 | [diff] [blame] | 202 | visibility: ["//build/make/target/product/gsi"], |
Inseob Kim | 01d4f8b | 2024-08-08 17:47:14 +0900 | [diff] [blame] | 203 | } |
| 204 | |
| 205 | build_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 | } |
Spandan Das | b9cef3b | 2024-11-06 22:08:28 +0000 | [diff] [blame] | 213 | |
| 214 | build_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 | |
| 223 | build_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 | |
| 232 | build_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 | } |
Cole Faust | 4385d35 | 2024-11-12 15:13:37 -0800 | [diff] [blame] | 240 | |
| 241 | build_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 | } |