blob: 9d5b07def6408000ef0a77745a0fa3b7dd5bce10 [file] [log] [blame]
Bob Badour02040de2021-02-03 18:08:28 -08001package {
2 default_applicable_licenses: ["Android-Apache-2.0"],
3}
4
Dan Willemsen377737a2016-08-15 15:02:23 -07005subdirs = [
6 "androidmk",
Jeff Gastonaff66e52017-06-19 15:39:54 -07007 "bpfix",
Dan Willemsen377737a2016-08-15 15:02:23 -07008 "cmd/*",
Jeff Gastonf1fd45e2017-08-09 18:25:28 -07009 "fs",
10 "finder",
Jeff Gaston01547b22017-08-21 20:13:28 -070011 "jar",
Jeff Gaston11b5c512017-10-12 12:19:14 -070012 "zip",
Dan Willemsen377737a2016-08-15 15:02:23 -070013 "third_party/zip",
Dan Willemsen1e704462016-08-21 15:17:17 -070014 "ui/*",
Dan Willemsen377737a2016-08-15 15:02:23 -070015]
Colin Cross68f55102015-03-25 14:43:57 -070016
17bootstrap_go_package {
Colin Cross463a90e2015-06-17 14:20:06 -070018 name: "soong",
19 pkgPath: "android/soong",
20 deps: [
21 "blueprint",
22 ],
23 srcs: [
24 "doc.go",
Colin Cross463a90e2015-06-17 14:20:06 -070025 ],
26}
27
Colin Cross80031312015-03-14 14:28:22 -070028//
Dan Willemsen00fcbde2016-11-17 00:25:59 -080029// Defaults to enable various configurations of host bionic
30//
31
32cc_defaults {
33 name: "linux_bionic_supported",
34 host_supported: true,
35 target: {
36 host: {
37 enabled: false,
38 },
39 linux_bionic: {
40 enabled: true,
41 },
42 },
43}
44
45//
Colin Cross80031312015-03-14 14:28:22 -070046// C static libraries extracted from the gcc toolchain
47//
48
Colin Crossba442872015-03-14 14:26:32 -070049toolchain_library {
50 name: "libatomic",
Dan Willemsen2e47b342016-11-17 01:02:25 -080051 defaults: ["linux_bionic_supported"],
Dan Willemsen4416e5d2017-04-06 12:43:22 -070052 vendor_available: true,
Justin Yun63e9ec72020-10-29 16:49:43 +090053 product_available: true,
Yifan Hong50b36652020-01-21 16:38:29 -080054 ramdisk_available: true,
Yifan Hong02e7dec2020-10-21 18:38:12 -070055 vendor_ramdisk_available: true,
Jiyong Parkf9332f12018-02-01 00:54:12 +090056 recovery_available: true,
dimitry1f33e402019-03-26 12:39:31 +010057 native_bridge_supported: true,
Dan Willemsenfeea4df2018-10-07 18:16:48 -070058
Dan Willemseneba363e2015-07-08 18:11:14 -070059 arch: {
60 arm: {
Dan Willemsenfeea4df2018-10-07 18:16:48 -070061 src: "prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/arm-linux-androideabi/lib/libatomic.a",
62 },
63 arm64: {
64 src: "prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/lib64/libatomic.a",
65 },
66 x86: {
67 src: "prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9/x86_64-linux-android/lib/libatomic.a",
68 },
69 x86_64: {
70 src: "prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9/x86_64-linux-android/lib64/libatomic.a",
Dan Willemseneba363e2015-07-08 18:11:14 -070071 },
72 },
Colin Crossba442872015-03-14 14:26:32 -070073}
Colin Cross3f40fa42015-01-30 17:27:36 -080074
Colin Crossba442872015-03-14 14:26:32 -070075toolchain_library {
76 name: "libgcc",
Dan Willemsen2e47b342016-11-17 01:02:25 -080077 defaults: ["linux_bionic_supported"],
Dan Willemsen4416e5d2017-04-06 12:43:22 -070078 vendor_available: true,
Justin Yun63e9ec72020-10-29 16:49:43 +090079 product_available: true,
Jiyong Parkf9332f12018-02-01 00:54:12 +090080 recovery_available: true,
dimitry1f33e402019-03-26 12:39:31 +010081 native_bridge_supported: true,
Jiyong Park99644e92020-11-17 22:21:02 +090082 apex_available: [
83 "//apex_available:platform",
84 "//apex_available:anyapex",
85 ],
Dan Willemsenfeea4df2018-10-07 18:16:48 -070086
Dan Willemseneba363e2015-07-08 18:11:14 -070087 arch: {
88 arm: {
Dan Willemsenfeea4df2018-10-07 18:16:48 -070089 src: "prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/lib/gcc/arm-linux-androideabi/4.9.x/libgcc.a",
90 },
91 arm64: {
92 src: "prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/lib/gcc/aarch64-linux-android/4.9.x/libgcc.a",
93 },
94 x86: {
95 src: "prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9/lib/gcc/x86_64-linux-android/4.9.x/32/libgcc.a",
96 },
97 x86_64: {
98 src: "prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9/lib/gcc/x86_64-linux-android/4.9.x/libgcc.a",
Dan Willemseneba363e2015-07-08 18:11:14 -070099 },
100 },
Colin Crossba442872015-03-14 14:26:32 -0700101}
Colin Cross3f40fa42015-01-30 17:27:36 -0800102
Colin Crossba442872015-03-14 14:26:32 -0700103toolchain_library {
Yi Kongacee27c2019-03-29 20:05:14 -0700104 name: "libgcc_stripped",
105 defaults: ["linux_bionic_supported"],
106 vendor_available: true,
Justin Yun63e9ec72020-10-29 16:49:43 +0900107 product_available: true,
Yifan Hong50b36652020-01-21 16:38:29 -0800108 ramdisk_available: true,
Yifan Hong02e7dec2020-10-21 18:38:12 -0700109 vendor_ramdisk_available: true,
Yi Kongacee27c2019-03-29 20:05:14 -0700110 recovery_available: true,
dimitry0e55ba62019-05-06 10:58:10 +0200111 native_bridge_supported: true,
Peter Collingbournee5ba2862019-12-10 18:37:45 -0800112 sdk_version: "current",
Yi Kongacee27c2019-03-29 20:05:14 -0700113
114 arch: {
115 arm: {
116 src: "prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/lib/gcc/arm-linux-androideabi/4.9.x/libgcc.a",
Yi Kong14b65d12020-04-04 02:14:50 +0800117 repack_objects_to_keep: [],
118 enabled: false,
Yi Kongacee27c2019-03-29 20:05:14 -0700119 },
120 arm64: {
121 src: "prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/lib/gcc/aarch64-linux-android/4.9.x/libgcc.a",
Thiébaud Weksteen5e291c22020-06-26 14:04:00 +0200122 repack_objects_to_keep: [
123 "unwind-dw2.o",
124 "unwind-dw2-fde-dip.o",
125 ],
Yi Kongacee27c2019-03-29 20:05:14 -0700126 },
127 x86: {
128 src: "prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9/lib/gcc/x86_64-linux-android/4.9.x/32/libgcc.a",
Thiébaud Weksteen5e291c22020-06-26 14:04:00 +0200129 repack_objects_to_keep: [
130 "unwind-dw2.o",
131 "unwind-dw2-fde-dip.o",
132 ],
Yi Kongacee27c2019-03-29 20:05:14 -0700133 },
134 x86_64: {
135 src: "prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9/lib/gcc/x86_64-linux-android/4.9.x/libgcc.a",
Thiébaud Weksteen5e291c22020-06-26 14:04:00 +0200136 repack_objects_to_keep: [
137 "unwind-dw2.o",
138 "unwind-dw2-fde-dip.o",
139 ],
Yi Kongacee27c2019-03-29 20:05:14 -0700140 },
141 },
Yi Kongacee27c2019-03-29 20:05:14 -0700142}
143
144toolchain_library {
Josh Gao7bd4c5c2017-02-23 17:52:24 -0800145 name: "libwinpthread",
146 host_supported: true,
147 enabled: false,
148 target: {
149 windows: {
Dan Willemsenc77a0b32017-09-18 23:19:12 -0700150 enabled: true,
Josh Gao7bd4c5c2017-02-23 17:52:24 -0800151 },
Dan Willemsenfeea4df2018-10-07 18:16:48 -0700152 windows_x86: {
153 src: "prebuilts/gcc/linux-x86/host/x86_64-w64-mingw32-4.8/x86_64-w64-mingw32/lib32/libwinpthread.a",
154 },
155 windows_x86_64: {
156 src: "prebuilts/gcc/linux-x86/host/x86_64-w64-mingw32-4.8/x86_64-w64-mingw32/lib/libwinpthread.a",
157 },
Josh Gao7bd4c5c2017-02-23 17:52:24 -0800158 },
Jaewoong Jung62707f72018-11-16 13:26:43 -0800159 notice: ":mingw-libwinpthread-notice",
Josh Gao7bd4c5c2017-02-23 17:52:24 -0800160}
161
162toolchain_library {
Colin Crossba442872015-03-14 14:26:32 -0700163 name: "libgcov",
Dan Willemsen2e47b342016-11-17 01:02:25 -0800164 defaults: ["linux_bionic_supported"],
Dan Willemsenfeea4df2018-10-07 18:16:48 -0700165
Dan Willemseneba363e2015-07-08 18:11:14 -0700166 arch: {
167 arm: {
Dan Willemsenfeea4df2018-10-07 18:16:48 -0700168 src: "prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/lib/gcc/arm-linux-androideabi/4.9.x/libgcov.a",
169 },
170 arm64: {
171 src: "prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/lib/gcc/aarch64-linux-android/4.9.x/libgcov.a",
172 },
173 x86: {
174 src: "prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9/lib/gcc/x86_64-linux-android/4.9.x/32/libgcov.a",
175 },
176 x86_64: {
177 src: "prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9/lib/gcc/x86_64-linux-android/4.9.x/libgcov.a",
Dan Willemseneba363e2015-07-08 18:11:14 -0700178 },
179 },
Colin Crossba442872015-03-14 14:26:32 -0700180}
Jiyong Parkd773eb32017-07-03 13:18:12 +0900181
182kernel_headers {
183 name: "device_kernel_headers",
184 vendor: true,
Hridya Valsarajud61df502018-08-21 15:51:20 -0700185 recovery_available: true,
Jiyong Parkd773eb32017-07-03 13:18:12 +0900186}
Dan Willemsenc77a0b32017-09-18 23:19:12 -0700187
188cc_genrule {
189 name: "host_bionic_linker_asm",
190 host_supported: true,
191 device_supported: false,
192 target: {
193 linux_bionic: {
194 enabled: true,
195 },
Dan Willemsen9d6c6722017-10-02 10:41:07 -0700196 linux_glibc: {
Dan Willemsenc77a0b32017-09-18 23:19:12 -0700197 enabled: false,
198 },
199 darwin: {
200 enabled: false,
201 },
202 },
203 tools: ["extract_linker"],
204 cmd: "$(location) -s $(out) $(in)",
205 srcs: [":linker"],
206 out: ["linker.s"],
207}
208
209cc_genrule {
Dan Willemsena0790e32018-10-12 00:24:23 -0700210 name: "host_bionic_linker_flags",
Dan Willemsenc77a0b32017-09-18 23:19:12 -0700211 host_supported: true,
212 device_supported: false,
213 target: {
214 linux_bionic: {
215 enabled: true,
216 },
Dan Willemsen9d6c6722017-10-02 10:41:07 -0700217 linux_glibc: {
Dan Willemsenc77a0b32017-09-18 23:19:12 -0700218 enabled: false,
219 },
220 darwin: {
221 enabled: false,
222 },
223 },
224 tools: ["extract_linker"],
Dan Willemsena0790e32018-10-12 00:24:23 -0700225 cmd: "$(location) -f $(out) $(in)",
Dan Willemsenc77a0b32017-09-18 23:19:12 -0700226 srcs: [":linker"],
Dan Willemsena0790e32018-10-12 00:24:23 -0700227 out: ["linker.flags"],
Dan Willemsenc77a0b32017-09-18 23:19:12 -0700228}
Paul Duffin1ab61862021-01-20 17:44:53 +0000229
230// Instantiate the dex_bootjars singleton module.
231dex_bootjars {
232 name: "dex_bootjars",
233}