blob: 21d676b788b064e436b0c681d99c46f06b93251a [file] [log] [blame]
Bob Badour478a3762021-02-12 15:30:01 -08001package {
2 default_applicable_licenses: ["prebuilts_build-tools_license"],
3}
4
5// Added automatically by a large-scale-change that took the approach of
6// 'apply every license found to every target'. While this makes sure we respect
7// every license restriction, it may not be entirely correct.
8//
9// e.g. GPL in an MIT project might only apply to the contrib/ directory.
10//
11// Please consider splitting the single license below into multiple licenses,
12// taking care not to lose any license_kind information, and overriding the
13// default license using the 'licenses: [...]' property on targets as needed.
14//
15// For unused files, consider creating a 'fileGroup' with "//visibility:private"
16// to attach the license to, and including a comment whether the files may be
17// used in the current project.
18// See: http://go/android-license-faq
19license {
20 name: "prebuilts_build-tools_license",
21 visibility: [":__subpackages__"],
22 license_kinds: [
23 "SPDX-license-identifier-0BSD",
24 "SPDX-license-identifier-Apache-2.0",
25 "SPDX-license-identifier-BSD",
Bob Badour478a3762021-02-12 15:30:01 -080026 "SPDX-license-identifier-MIT",
27 "SPDX-license-identifier-PSF-2.0",
28 "SPDX-license-identifier-Zlib",
29 "legacy_unencumbered",
30 ],
Bob Badour93641b22022-07-14 11:42:19 -070031 license_text: [
Colin Crossb73be832022-09-21 11:39:54 -070032 "sysroots/aarch64-unknown-linux-musl/NOTICE.bionic",
33 "sysroots/aarch64-unknown-linux-musl/NOTICE.libc++",
34 "sysroots/aarch64-unknown-linux-musl/NOTICE.libc++abi",
35 "sysroots/aarch64-unknown-linux-musl/NOTICE.zlib",
36 "sysroots/arm-unknown-linux-musleabihf/NOTICE.bionic",
37 "sysroots/arm-unknown-linux-musleabihf/NOTICE.libc++",
38 "sysroots/arm-unknown-linux-musleabihf/NOTICE.libc++abi",
39 "sysroots/arm-unknown-linux-musleabihf/NOTICE.zlib",
40 "sysroots/i686-unknown-linux-musl/NOTICE.bionic",
41 "sysroots/i686-unknown-linux-musl/NOTICE.libc++",
42 "sysroots/i686-unknown-linux-musl/NOTICE.libc++abi",
43 "sysroots/i686-unknown-linux-musl/NOTICE.zlib",
44 "sysroots/x86_64-unknown-linux-musl/NOTICE.bionic",
45 "sysroots/x86_64-unknown-linux-musl/NOTICE.libc++",
46 "sysroots/x86_64-unknown-linux-musl/NOTICE.libc++abi",
47 "sysroots/x86_64-unknown-linux-musl/NOTICE.zlib",
Bob Badour93641b22022-07-14 11:42:19 -070048 ],
Bob Badour478a3762021-02-12 15:30:01 -080049}
50
Bob Badour7dc1b5b2022-10-15 11:21:05 -070051license {
52 name: "prebuilts_build-tools_bison_license",
53 package_name: "bison",
54 visibility: [":__subpackages__"],
55 license_kinds: ["SPDX-license-identifier-GPL-3.0"],
56 license_text: ["common/bison/NOTICE"],
57}
58
59license {
60 name: "prebuilts_build-tools_gnu_license",
61 package_name: "Official GNU software",
62 visibility: [":__subpackages__"],
63 license_kinds: ["SPDX-license-identifier-GPL-3.0"],
64 license_text: ["LICENSE-GPL-3.0"],
65}
66
67license {
68 name: "prebuilts_build-tools_flex_license",
69 package_name: "flex",
70 visibility: [":__subpackages__"],
71 license_kinds: ["SPDX-license-identifier-BSD"],
72 license_text: ["common/flex/NOTICE"],
73}
74
Dan Willemsen47f445f2019-12-26 09:23:54 -080075cc_library_headers {
76 name: "FlexLexer",
77 host_supported: true,
78 vendor_available: true,
Victor Khimenko14ede932020-05-12 00:09:59 +020079 // TODO(b/153609531): remove when no longer needed.
80 native_bridge_supported: true,
Bob Badour7dc1b5b2022-10-15 11:21:05 -070081 licenses: ["prebuilts_build-tools_flex_license"],
Dan Willemsen47f445f2019-12-26 09:23:54 -080082 export_include_dirs: ["common/flex"],
Dan Willemsen47f445f2019-12-26 09:23:54 -080083}
Dan Willemsenf3acd612020-07-16 17:45:05 -070084
85prebuilt_build_tool {
86 name: "bison",
87 deps: ["common/bison/**/*"],
Bob Badour7dc1b5b2022-10-15 11:21:05 -070088 licenses: ["prebuilts_build-tools_bison_license"],
Dan Willemsende9f4772020-07-17 19:42:12 -070089 export_to_make_var: "BISON",
Jiyong Park1291abb2020-09-09 17:16:54 +090090 enabled: false,
91 arch: {
92 x86_64: {
93 enabled: true,
94 },
95 },
Dan Willemsenf3acd612020-07-16 17:45:05 -070096 target: {
97 darwin: {
98 src: "darwin-x86/bin/bison",
99 deps: ["darwin-x86/lib64/libc++.dylib"],
100 },
101 linux: {
102 src: "linux-x86/bin/bison",
103 deps: ["linux-x86/lib64/libc++.so"],
104 },
105 },
106}
107
108prebuilt_build_tool {
109 name: "flex",
Dan Willemsende9f4772020-07-17 19:42:12 -0700110 export_to_make_var: "LEX",
Jiyong Park1291abb2020-09-09 17:16:54 +0900111 enabled: false,
112 arch: {
113 x86_64: {
114 enabled: true,
115 },
116 },
Bob Badour7dc1b5b2022-10-15 11:21:05 -0700117 licenses: ["prebuilts_build-tools_flex_license"],
Dan Willemsenf3acd612020-07-16 17:45:05 -0700118 target: {
119 darwin: {
120 src: "darwin-x86/bin/flex",
121 },
122 linux: {
123 src: "linux-x86/bin/flex",
124 },
125 },
126}
127
128prebuilt_build_tool {
129 name: "m4",
Dan Willemsende9f4772020-07-17 19:42:12 -0700130 export_to_make_var: "M4",
Jiyong Park1291abb2020-09-09 17:16:54 +0900131 enabled: false,
132 arch: {
133 x86_64: {
134 enabled: true,
135 },
136 },
Bob Badour7dc1b5b2022-10-15 11:21:05 -0700137 licenses: ["prebuilts_build-tools_gnu_license"],
Dan Willemsenf3acd612020-07-16 17:45:05 -0700138 target: {
139 darwin: {
140 src: "darwin-x86/bin/m4",
141 },
142 linux: {
143 src: "linux-x86/bin/m4",
144 },
145 },
146}
Dan Willemsen79299d12020-12-23 16:51:09 -0800147
148///
149// cpython3 host prebuilts
150///
151soong_config_module_type {
152 name: "cpython3_cc_prebuilt_binary",
153 module_type: "cc_prebuilt_binary",
154 config_namespace: "cpython3",
155 bool_variables: ["force_build_host"],
156 properties: ["prefer"],
157}
158
159cpython3_cc_prebuilt_binary {
160 name: "py3-launcher",
161 host_supported: true,
162 device_supported: false,
163 compile_multilib: "64",
164 stl: "none",
Dan Willemsen79299d12020-12-23 16:51:09 -0800165 target: {
Colin Crosscbb30962022-03-08 13:22:35 -0800166 glibc_x86_64: {
Dan Willemsen79299d12020-12-23 16:51:09 -0800167 srcs: ["linux-x86/bin/py3-launcher64"]
168 },
Colin Cross01d9e162023-04-19 16:18:23 -0700169 musl_arm64: {
170 srcs: ["linux_musl-arm64/bin/py3-launcher64"]
171 },
Colin Crosscbb30962022-03-08 13:22:35 -0800172 musl_x86_64: {
173 srcs: ["linux_musl-x86/bin/py3-launcher64"]
174 },
Dan Willemsen79299d12020-12-23 16:51:09 -0800175 darwin_x86_64: {
176 srcs: ["darwin-x86/bin/py3-launcher64"],
177 },
178 },
179
180 // Use the prebuilts for most branches
181 prefer: true,
182 soong_config_variables: {
183 force_build_host: {
184 prefer: false,
185 },
186 },
187}
188
189cpython3_cc_prebuilt_binary {
Colin Crosscbb30962022-03-08 13:22:35 -0800190 name: "py3-launcher-static",
191 host_supported: true,
192 device_supported: false,
193 compile_multilib: "64",
194 stl: "none",
Colin Crosscbb30962022-03-08 13:22:35 -0800195 target: {
Colin Cross01d9e162023-04-19 16:18:23 -0700196 musl_arm64: {
197 srcs: ["linux_musl-arm64/bin/py3-launcher-static64"]
198 },
Colin Crosscbb30962022-03-08 13:22:35 -0800199 musl_x86_64: {
200 srcs: ["linux_musl-x86/bin/py3-launcher-static64"]
201 },
202 },
203
204 // Use the prebuilts for most branches
205 prefer: true,
206 soong_config_variables: {
207 force_build_host: {
208 prefer: false,
209 },
210 },
211}
212
213cpython3_cc_prebuilt_binary {
Dan Willemsen79299d12020-12-23 16:51:09 -0800214 name: "py3-launcher-autorun",
215 host_supported: true,
216 device_supported: false,
217 compile_multilib: "64",
218 stl: "none",
Dan Willemsen79299d12020-12-23 16:51:09 -0800219 target: {
Colin Crosscbb30962022-03-08 13:22:35 -0800220 glibc_x86_64: {
Dan Willemsen79299d12020-12-23 16:51:09 -0800221 srcs: ["linux-x86/bin/py3-launcher-autorun64"]
222 },
Colin Cross01d9e162023-04-19 16:18:23 -0700223 musl_arm64: {
224 srcs: ["linux_musl-arm64/bin/py3-launcher-autorun64"]
225 },
Colin Crosscbb30962022-03-08 13:22:35 -0800226 musl_x86_64: {
227 srcs: ["linux_musl-x86/bin/py3-launcher-autorun64"]
228 },
Dan Willemsen79299d12020-12-23 16:51:09 -0800229 darwin_x86_64: {
230 srcs: ["darwin-x86/bin/py3-launcher-autorun64"],
231 },
232 },
233
234 // Use the prebuilts for most branches
235 prefer: true,
236 soong_config_variables: {
237 force_build_host: {
238 prefer: false,
239 },
240 },
241}
242
Colin Crosscbb30962022-03-08 13:22:35 -0800243cpython3_cc_prebuilt_binary {
244 name: "py3-launcher-autorun-static",
245 host_supported: true,
246 device_supported: false,
247 compile_multilib: "64",
248 stl: "none",
Colin Crosscbb30962022-03-08 13:22:35 -0800249 target: {
Colin Cross01d9e162023-04-19 16:18:23 -0700250 musl_arm64: {
251 srcs: ["linux_musl-arm64/bin/py3-launcher-autorun-static64"]
252 },
Colin Crosscbb30962022-03-08 13:22:35 -0800253 musl_x86_64: {
254 srcs: ["linux_musl-x86/bin/py3-launcher-autorun-static64"]
255 },
256 },
257
258 // Use the prebuilts for most branches
259 prefer: true,
260 soong_config_variables: {
261 force_build_host: {
262 prefer: false,
263 },
264 },
265}
266
Dan Willemsen79299d12020-12-23 16:51:09 -0800267filegroup {
268 name: "py3-stdlib-prebuilt-srcs",
269 visibility: ["//external/python/cpython3/Lib"],
270 srcs: ["common/py3-stdlib/**/*.py"],
271 path: "common/py3-stdlib",
272}