Nan Zhang | c393914 | 2017-05-25 23:21:27 -0700 | [diff] [blame] | 1 | // Copyright 2017 Google Inc. All rights reserved. |
| 2 | // |
| 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | // you may not use this file except in compliance with the License. |
| 5 | // You may obtain a copy of the License at |
| 6 | // |
| 7 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | // |
| 9 | // Unless required by applicable law or agreed to in writing, software |
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | // See the License for the specific language governing permissions and |
| 13 | // limitations under the License. |
| 14 | |
Bob Badour | 84389f6 | 2021-03-08 11:43:30 -0800 | [diff] [blame^] | 15 | // *** THIS PACKAGE HAS SPECIAL LICENSING CONDITIONS. PLEASE |
| 16 | // CONSULT THE OWNERS AND opensource-licensing@google.com BEFORE |
| 17 | // DEPENDING ON IT IN YOUR PROJECT. *** |
| 18 | package { |
| 19 | default_applicable_licenses: ["external_python_cpython2_license"], |
| 20 | } |
| 21 | |
| 22 | // Added automatically by a large-scale-change that took the approach of |
| 23 | // 'apply every license found to every target'. While this makes sure we respect |
| 24 | // every license restriction, it may not be entirely correct. |
| 25 | // |
| 26 | // e.g. GPL in an MIT project might only apply to the contrib/ directory. |
| 27 | // |
| 28 | // Please consider splitting the single license below into multiple licenses, |
| 29 | // taking care not to lose any license_kind information, and overriding the |
| 30 | // default license using the 'licenses: [...]' property on targets as needed. |
| 31 | // |
| 32 | // For unused files, consider creating a 'fileGroup' with "//visibility:private" |
| 33 | // to attach the license to, and including a comment whether the files may be |
| 34 | // used in the current project. |
| 35 | // See: http://go/android-license-faq |
| 36 | license { |
| 37 | name: "external_python_cpython2_license", |
| 38 | visibility: [":__subpackages__"], |
| 39 | license_kinds: [ |
| 40 | "SPDX-license-identifier-0BSD", |
| 41 | "SPDX-license-identifier-Apache-2.0", |
| 42 | "SPDX-license-identifier-BSD", |
| 43 | "SPDX-license-identifier-CC0-1.0", |
| 44 | "SPDX-license-identifier-GPL", |
| 45 | "SPDX-license-identifier-GPL-2.0", |
| 46 | "SPDX-license-identifier-GPL-3.0", |
| 47 | "SPDX-license-identifier-LGPL-2.1", |
| 48 | "SPDX-license-identifier-MIT", |
| 49 | "SPDX-license-identifier-MPL", |
| 50 | "SPDX-license-identifier-PSF-2.0", |
| 51 | "SPDX-license-identifier-Zlib", |
| 52 | "legacy_by_exception_only", // by exception only |
| 53 | "legacy_notice", |
| 54 | "legacy_unencumbered", |
| 55 | ], |
| 56 | license_text: [ |
| 57 | "LICENSE", |
| 58 | ], |
| 59 | } |
| 60 | |
Nan Zhang | ced2751 | 2017-06-19 18:01:34 -0700 | [diff] [blame] | 61 | subdirs = [ |
| 62 | "Lib", |
| 63 | ] |
| 64 | |
Nan Zhang | c393914 | 2017-05-25 23:21:27 -0700 | [diff] [blame] | 65 | cc_defaults { |
| 66 | name: "py2-interp-defaults", |
| 67 | cflags: [ |
| 68 | "-fwrapv", |
| 69 | "-O3", |
| 70 | "-Wall", |
| 71 | "-Wstrict-prototypes", |
| 72 | "-DPy_BUILD_CORE", |
Nan Zhang | 33bb4bb | 2017-12-01 20:00:54 +0000 | [diff] [blame] | 73 | "-Werror", |
Dan Willemsen | 04e3910 | 2019-02-14 21:00:06 -0800 | [diff] [blame] | 74 | "-Wno-invalid-source-encoding", |
Tri Vo | 0b5cc4f | 2017-12-11 13:29:15 -0800 | [diff] [blame] | 75 | "-Wno-int-conversion", |
Nan Zhang | c393914 | 2017-05-25 23:21:27 -0700 | [diff] [blame] | 76 | "-Wno-missing-field-initializers", |
Yi Kong | 892b1a8 | 2018-12-12 11:58:51 -0800 | [diff] [blame] | 77 | "-Wno-null-pointer-arithmetic", |
Elliott Hughes | e42a596 | 2018-10-26 13:18:00 -0700 | [diff] [blame] | 78 | "-Wno-register", |
Nan Zhang | c393914 | 2017-05-25 23:21:27 -0700 | [diff] [blame] | 79 | "-Wno-shift-count-overflow", |
| 80 | "-Wno-sign-compare", |
Stephen Hines | cec0239 | 2020-07-15 17:42:06 -0700 | [diff] [blame] | 81 | "-Wno-strict-prototypes", |
Nan Zhang | c393914 | 2017-05-25 23:21:27 -0700 | [diff] [blame] | 82 | "-Wno-tautological-compare", |
| 83 | "-Wno-tautological-constant-out-of-range-compare", |
| 84 | "-Wno-unused-parameter", |
| 85 | "-Wno-unused-result", |
| 86 | ], |
| 87 | local_include_dirs: ["Include"], |
| 88 | target: { |
Nan Zhang | 33bb4bb | 2017-12-01 20:00:54 +0000 | [diff] [blame] | 89 | android_arm: { |
| 90 | local_include_dirs: ["android_arm/pyconfig"], |
| 91 | }, |
| 92 | android_arm64: { |
| 93 | local_include_dirs: ["android_arm64/pyconfig"], |
| 94 | }, |
| 95 | android_x86: { |
| 96 | local_include_dirs: ["android_x86/pyconfig"], |
| 97 | }, |
Alex Light | 6f3263d | 2019-02-27 14:37:14 -0800 | [diff] [blame] | 98 | linux_bionic: { |
| 99 | // NB linux_bionic is a 'host' architecture but it uses the bionic libc like 'android' |
| 100 | // targets so use the android pyconfig. |
| 101 | local_include_dirs: ["android_x86_64/pyconfig"], |
| 102 | }, |
Nan Zhang | 33bb4bb | 2017-12-01 20:00:54 +0000 | [diff] [blame] | 103 | android_x86_64: { |
| 104 | local_include_dirs: ["android_x86_64/pyconfig"], |
| 105 | }, |
Dan Willemsen | c88c080 | 2017-09-25 14:33:27 -0700 | [diff] [blame] | 106 | // Regenerate include dirs with android_regen.sh |
| 107 | darwin_x86_64: { |
| 108 | local_include_dirs: ["darwin_x86_64/pyconfig"], |
Stephen Hines | b788eb5 | 2017-11-20 17:31:30 -0800 | [diff] [blame] | 109 | cflags: [ |
| 110 | "-Wno-deprecated-declarations", |
| 111 | "-Wno-pointer-arith", |
| 112 | ], |
Dan Willemsen | c88c080 | 2017-09-25 14:33:27 -0700 | [diff] [blame] | 113 | }, |
Nan Zhang | 33bb4bb | 2017-12-01 20:00:54 +0000 | [diff] [blame] | 114 | linux_glibc_x86: { |
| 115 | enabled: false, |
| 116 | }, |
Dan Willemsen | e41d4ce | 2017-10-02 10:41:09 -0700 | [diff] [blame] | 117 | linux_glibc_x86_64: { |
Dan Willemsen | c88c080 | 2017-09-25 14:33:27 -0700 | [diff] [blame] | 118 | local_include_dirs: ["linux_x86_64/pyconfig"], |
Chih-Hung Hsieh | 6eebfa0 | 2017-10-13 14:40:05 -0700 | [diff] [blame] | 119 | cflags: ["-Werror"], |
Dan Willemsen | c88c080 | 2017-09-25 14:33:27 -0700 | [diff] [blame] | 120 | }, |
| 121 | windows: { |
| 122 | enabled: false, |
| 123 | }, |
Nan Zhang | c393914 | 2017-05-25 23:21:27 -0700 | [diff] [blame] | 124 | }, |
| 125 | host_supported: true, |
Nan Zhang | 33bb4bb | 2017-12-01 20:00:54 +0000 | [diff] [blame] | 126 | compile_multilib: "both", |
| 127 | multilib: { |
| 128 | lib32: { |
| 129 | suffix: "32", |
| 130 | }, |
| 131 | lib64: { |
| 132 | suffix: "64", |
| 133 | }, |
| 134 | }, |
Nan Zhang | c393914 | 2017-05-25 23:21:27 -0700 | [diff] [blame] | 135 | } |
| 136 | |
| 137 | cc_library_static { |
| 138 | name: "py2-interp-parser", |
| 139 | defaults: ["py2-interp-defaults"], |
| 140 | srcs: [ |
| 141 | "Parser/acceler.c", |
| 142 | "Parser/bitset.c", |
| 143 | "Parser/firstsets.c", |
| 144 | "Parser/grammar.c", |
| 145 | "Parser/grammar1.c", |
| 146 | "Parser/listnode.c", |
| 147 | "Parser/metagrammar.c", |
| 148 | "Parser/myreadline.c", |
| 149 | "Parser/node.c", |
| 150 | "Parser/parser.c", |
| 151 | "Parser/parsetok.c", |
| 152 | "Parser/pgen.c", |
| 153 | "Parser/tokenizer.c", |
| 154 | ], |
| 155 | } |
| 156 | |
| 157 | cc_library_static { |
| 158 | name: "py2-interp-object", |
| 159 | defaults: ["py2-interp-defaults"], |
| 160 | srcs: [ |
| 161 | "Objects/abstract.c", |
| 162 | "Objects/boolobject.c", |
| 163 | "Objects/bufferobject.c", |
| 164 | "Objects/bytes_methods.c", |
| 165 | "Objects/bytearrayobject.c", |
| 166 | "Objects/capsule.c", |
| 167 | "Objects/cellobject.c", |
| 168 | "Objects/classobject.c", |
| 169 | "Objects/cobject.c", |
| 170 | "Objects/codeobject.c", |
| 171 | "Objects/complexobject.c", |
| 172 | "Objects/descrobject.c", |
| 173 | "Objects/enumobject.c", |
| 174 | "Objects/exceptions.c", |
| 175 | "Objects/genobject.c", |
| 176 | "Objects/fileobject.c", |
| 177 | "Objects/floatobject.c", |
| 178 | "Objects/frameobject.c", |
| 179 | "Objects/funcobject.c", |
| 180 | "Objects/intobject.c", |
| 181 | "Objects/iterobject.c", |
| 182 | "Objects/listobject.c", |
| 183 | "Objects/longobject.c", |
| 184 | "Objects/dictobject.c", |
| 185 | "Objects/memoryobject.c", |
| 186 | "Objects/methodobject.c", |
| 187 | "Objects/moduleobject.c", |
| 188 | "Objects/object.c", |
| 189 | "Objects/obmalloc.c", |
| 190 | "Objects/rangeobject.c", |
| 191 | "Objects/setobject.c", |
| 192 | "Objects/sliceobject.c", |
| 193 | "Objects/stringobject.c", |
| 194 | "Objects/structseq.c", |
| 195 | "Objects/tupleobject.c", |
| 196 | "Objects/typeobject.c", |
| 197 | "Objects/weakrefobject.c", |
| 198 | "Objects/unicodeobject.c", |
| 199 | "Objects/unicodectype.c", |
| 200 | ], |
| 201 | } |
| 202 | |
| 203 | cc_library_static { |
| 204 | name: "py2-interp-python", |
| 205 | defaults: ["py2-interp-defaults"], |
Nan Zhang | 04b6dca | 2017-12-05 13:34:52 -0800 | [diff] [blame] | 206 | target: { |
| 207 | linux: { |
| 208 | cflags: [ |
| 209 | "-DPLATFORM=\"linux2\"", |
| 210 | ], |
| 211 | }, |
| 212 | darwin_x86_64: { |
| 213 | cflags: [ |
| 214 | "-DPLATFORM=\"darwin\"", |
| 215 | ], |
| 216 | }, |
| 217 | }, |
Nan Zhang | c393914 | 2017-05-25 23:21:27 -0700 | [diff] [blame] | 218 | srcs: [ |
| 219 | "Python/_warnings.c", |
| 220 | "Python/Python-ast.c", |
| 221 | "Python/asdl.c", |
| 222 | "Python/ast.c", |
| 223 | "Python/bltinmodule.c", |
| 224 | "Python/ceval.c", |
| 225 | "Python/compile.c", |
| 226 | "Python/codecs.c", |
| 227 | "Python/errors.c", |
| 228 | "Python/frozen.c", |
| 229 | "Python/frozenmain.c", |
| 230 | "Python/future.c", |
| 231 | "Python/getargs.c", |
| 232 | "Python/getcompiler.c", |
| 233 | "Python/getcopyright.c", |
| 234 | "Python/getplatform.c", |
| 235 | "Python/getversion.c", |
| 236 | "Python/graminit.c", |
| 237 | "Python/import.c", |
| 238 | "Python/importdl.c", |
| 239 | "Python/marshal.c", |
| 240 | "Python/modsupport.c", |
| 241 | "Python/mystrtoul.c", |
| 242 | "Python/mysnprintf.c", |
| 243 | "Python/peephole.c", |
| 244 | "Python/pyarena.c", |
| 245 | "Python/pyctype.c", |
| 246 | "Python/pyfpe.c", |
| 247 | "Python/pymath.c", |
| 248 | "Python/pystate.c", |
| 249 | "Python/pythonrun.c", |
| 250 | "Python/random.c", |
| 251 | "Python/structmember.c", |
| 252 | "Python/symtable.c", |
| 253 | "Python/sysmodule.c", |
| 254 | "Python/traceback.c", |
| 255 | "Python/getopt.c", |
| 256 | "Python/pystrcmp.c", |
| 257 | "Python/pystrtod.c", |
| 258 | "Python/dtoa.c", |
| 259 | "Python/formatter_unicode.c", |
| 260 | "Python/formatter_string.c", |
| 261 | "Python/dynload_shlib.c", |
| 262 | "Python/thread.c", |
| 263 | ], |
| 264 | } |
| 265 | |
Dan Willemsen | cd28285 | 2019-02-14 21:41:18 -0800 | [diff] [blame] | 266 | cc_defaults { |
| 267 | name: "py2-launcher-defaults", |
Nan Zhang | c393914 | 2017-05-25 23:21:27 -0700 | [diff] [blame] | 268 | defaults: ["py2-interp-defaults"], |
Nan Zhang | c393914 | 2017-05-25 23:21:27 -0700 | [diff] [blame] | 269 | cflags: [ |
Nan Zhang | c393914 | 2017-05-25 23:21:27 -0700 | [diff] [blame] | 270 | "-DVERSION=\"2.7\"", |
Nan Zhang | ced2751 | 2017-06-19 18:01:34 -0700 | [diff] [blame] | 271 | "-DVPATH=\"\"", |
| 272 | "-DPREFIX=\"\"", |
| 273 | "-DEXEC_PREFIX=\"\"", |
Dan Willemsen | 99f2754 | 2019-02-14 21:21:48 -0800 | [diff] [blame] | 274 | "-DPYTHONPATH=\"..:\"", |
| 275 | "-DANDROID_SKIP_ZIP_PATH", |
| 276 | "-DANDROID_SKIP_EXEC_PREFIX_PATH", |
| 277 | "-DANDROID_LIB_PYTHON_PATH=\"internal/stdlib\"", |
Igor Murashkin | ec37d4a | 2018-08-01 14:30:55 -0700 | [diff] [blame] | 278 | "-DDATE=\"Dec 31 1969\"", |
| 279 | "-DTIME=\"23:59:59\"", |
Nan Zhang | c393914 | 2017-05-25 23:21:27 -0700 | [diff] [blame] | 280 | ], |
Dan Willemsen | cd28285 | 2019-02-14 21:41:18 -0800 | [diff] [blame] | 281 | static_libs: [ |
| 282 | "libbase", |
Colin Cross | f67325c | 2019-09-18 11:05:54 -0700 | [diff] [blame] | 283 | "libcrypto_static", |
Dan Willemsen | cd28285 | 2019-02-14 21:41:18 -0800 | [diff] [blame] | 284 | "libexpat", |
Tom Cherry | 9645932 | 2020-01-08 14:11:54 -0800 | [diff] [blame] | 285 | "liblog", |
Dan Willemsen | cd28285 | 2019-02-14 21:41:18 -0800 | [diff] [blame] | 286 | "libssl", |
| 287 | "libz", |
| 288 | ], |
| 289 | target: { |
| 290 | linux_glibc_x86_64: { |
| 291 | host_ldlibs: ["-lutil"], |
| 292 | }, |
Dan Willemsen | a7c6b23 | 2019-02-20 10:43:11 -0800 | [diff] [blame] | 293 | darwin: { |
| 294 | host_ldlibs: [ |
| 295 | "-framework SystemConfiguration", |
| 296 | "-framework CoreFoundation", |
| 297 | ], |
| 298 | }, |
Dan Willemsen | cd28285 | 2019-02-14 21:41:18 -0800 | [diff] [blame] | 299 | host: { |
| 300 | static_libs: ["libsqlite"], |
| 301 | }, |
| 302 | // Use shared libsqlite for device side, otherwise |
| 303 | // the executable size will be really huge. |
| 304 | android: { |
| 305 | shared_libs: ["libsqlite"], |
| 306 | }, |
| 307 | }, |
| 308 | } |
| 309 | |
| 310 | cc_library_static { |
| 311 | name: "py2-launcher-lib", |
| 312 | defaults: ["py2-launcher-defaults"], |
Nan Zhang | c393914 | 2017-05-25 23:21:27 -0700 | [diff] [blame] | 313 | srcs: [ |
Nan Zhang | c393914 | 2017-05-25 23:21:27 -0700 | [diff] [blame] | 314 | "Modules/gcmodule.c", |
| 315 | "Modules/getpath.c", |
| 316 | "Modules/config.c", |
| 317 | "Modules/getbuildinfo.c", |
Nan Zhang | ced2751 | 2017-06-19 18:01:34 -0700 | [diff] [blame] | 318 | // Default built-in extension py2-c-modules. |
Nan Zhang | c393914 | 2017-05-25 23:21:27 -0700 | [diff] [blame] | 319 | "Modules/threadmodule.c", |
| 320 | "Modules/signalmodule.c", |
| 321 | "Modules/posixmodule.c", |
| 322 | "Modules/errnomodule.c", |
| 323 | "Modules/pwdmodule.c", |
| 324 | "Modules/_sre.c", |
| 325 | "Modules/_codecsmodule.c", |
| 326 | "Modules/_weakref.c", |
| 327 | "Modules/zipimport.c", |
| 328 | "Modules/symtablemodule.c", |
Dan Willemsen | eba50a5 | 2018-11-16 17:27:26 -0800 | [diff] [blame] | 329 | "Modules/main.c", |
Nan Zhang | ced2751 | 2017-06-19 18:01:34 -0700 | [diff] [blame] | 330 | ], |
| 331 | // NOTE: Please update Modules/config.c if new lib get added in the static_libs. |
Dan Willemsen | cd28285 | 2019-02-14 21:41:18 -0800 | [diff] [blame] | 332 | whole_static_libs: [ |
Nan Zhang | ced2751 | 2017-06-19 18:01:34 -0700 | [diff] [blame] | 333 | // Be careful the order of these three static libraries below due to |
| 334 | // missing symbols issues. |
Nan Zhang | c393914 | 2017-05-25 23:21:27 -0700 | [diff] [blame] | 335 | "py2-interp-object", |
| 336 | "py2-interp-python", |
Nan Zhang | ced2751 | 2017-06-19 18:01:34 -0700 | [diff] [blame] | 337 | "py2-interp-parser", |
| 338 | "py2-c-module-array", |
| 339 | "py2-c-module-cmath", |
| 340 | "py2-c-module-math", |
| 341 | "py2-c-module-_struct", |
| 342 | "py2-c-module-time", |
| 343 | "py2-c-module-operator", |
| 344 | "py2-c-module-_testcapi", |
| 345 | "py2-c-module-_random", |
| 346 | "py2-c-module-_collections", |
| 347 | "py2-c-module-_heapq", |
| 348 | "py2-c-module-itertools", |
| 349 | "py2-c-module-strop", |
| 350 | "py2-c-module-_functools", |
| 351 | "py2-c-module-datetime", |
| 352 | "py2-c-module-_bisect", |
| 353 | "py2-c-module-unicodedata", |
| 354 | "py2-c-module-_io", |
| 355 | "py2-c-module-fcntl", |
| 356 | "py2-c-module-select", |
| 357 | "py2-c-module-mmap", |
| 358 | "py2-c-module-_csv", |
| 359 | "py2-c-module-_socket", |
| 360 | "py2-c-module-termios", |
Dan Willemsen | dbcebe0 | 2019-01-07 18:07:24 -0800 | [diff] [blame] | 361 | "py2-c-module-_ssl", |
Nan Zhang | ced2751 | 2017-06-19 18:01:34 -0700 | [diff] [blame] | 362 | "py2-c-module-_md5", |
| 363 | "py2-c-module-_sha", |
| 364 | "py2-c-module-_sha256", |
| 365 | "py2-c-module-_sha512", |
| 366 | "py2-c-module-binascii", |
| 367 | "py2-c-module-parser", |
| 368 | "py2-c-module-cStringIO", |
| 369 | "py2-c-module-cPickle", |
| 370 | "py2-c-module-xxsubtype", |
| 371 | "py2-c-module-future_builtins", |
| 372 | "py2-c-module-_json", |
| 373 | "py2-c-module-_hotshot", |
| 374 | "py2-c-module-_lsprof", |
| 375 | "py2-c-module-grp", |
| 376 | "py2-c-module-syslog", |
| 377 | "py2-c-module-audioop", |
| 378 | "py2-c-module-resource", |
| 379 | "py2-c-module-_multibytecodec", |
Nan Zhang | d5c4d4a | 2017-07-19 16:22:00 -0700 | [diff] [blame] | 380 | "py2-c-module-_codecs_kr", |
| 381 | "py2-c-module-_codecs_jp", |
| 382 | "py2-c-module-_codecs_cn", |
| 383 | "py2-c-module-_codecs_tw", |
| 384 | "py2-c-module-_codecs_hk", |
| 385 | "py2-c-module-_codecs_iso2022", |
Nan Zhang | ced2751 | 2017-06-19 18:01:34 -0700 | [diff] [blame] | 386 | "py2-c-module-_multiprocessing", |
| 387 | "py2-c-module-zlib", |
Nan Zhang | d5c4d4a | 2017-07-19 16:22:00 -0700 | [diff] [blame] | 388 | "py2-c-module-pyexpat", |
| 389 | "py2-c-module-_sqlite3", |
| 390 | "py2-c-module-_ctypes_test", |
| 391 | "py2-c-module-_ctypes", |
Nan Zhang | c393914 | 2017-05-25 23:21:27 -0700 | [diff] [blame] | 392 | ], |
Dan Willemsen | a7c6b23 | 2019-02-20 10:43:11 -0800 | [diff] [blame] | 393 | target: { |
| 394 | darwin: { |
| 395 | whole_static_libs: ["py2-c-module-_scproxy"], |
| 396 | }, |
| 397 | }, |
Dan Willemsen | cd28285 | 2019-02-14 21:41:18 -0800 | [diff] [blame] | 398 | } |
| 399 | |
| 400 | cc_binary { |
| 401 | name: "py2-launcher", |
| 402 | defaults: ["py2-launcher-defaults"], |
| 403 | srcs: ["Launcher/launcher_main.cpp"], |
| 404 | static_libs: ["py2-launcher-lib"], |
| 405 | } |
| 406 | |
| 407 | cc_binary { |
| 408 | name: "py2-launcher-autorun", |
| 409 | defaults: ["py2-launcher-defaults"], |
| 410 | srcs: ["Launcher/launcher_main.cpp"], |
| 411 | static_libs: ["py2-launcher-lib"], |
| 412 | cflags: ["-DANDROID_AUTORUN"], |
| 413 | } |
| 414 | |
| 415 | python_binary_host { |
| 416 | name: "py2-cmd", |
| 417 | autorun: false, |
| 418 | version: { |
| 419 | py2: { |
| 420 | enabled: true, |
| 421 | embedded_launcher: true, |
Nan Zhang | 33bb4bb | 2017-12-01 20:00:54 +0000 | [diff] [blame] | 422 | }, |
Dan Willemsen | cd28285 | 2019-02-14 21:41:18 -0800 | [diff] [blame] | 423 | py3: { |
| 424 | enabled: false, |
Dan Willemsen | c88c080 | 2017-09-25 14:33:27 -0700 | [diff] [blame] | 425 | }, |
| 426 | }, |
Nan Zhang | c393914 | 2017-05-25 23:21:27 -0700 | [diff] [blame] | 427 | } |
| 428 | |
Nan Zhang | ced2751 | 2017-06-19 18:01:34 -0700 | [diff] [blame] | 429 | // Enabled extension py2-c-modules. |
Nan Zhang | c393914 | 2017-05-25 23:21:27 -0700 | [diff] [blame] | 430 | |
| 431 | cc_library_static { |
Nan Zhang | ced2751 | 2017-06-19 18:01:34 -0700 | [diff] [blame] | 432 | name: "py2-c-module-array", |
Nan Zhang | c393914 | 2017-05-25 23:21:27 -0700 | [diff] [blame] | 433 | defaults: ["py2-interp-defaults"], |
| 434 | srcs: [ |
| 435 | "Modules/arraymodule.c", |
| 436 | ], |
| 437 | } |
| 438 | |
| 439 | cc_library_static { |
Nan Zhang | ced2751 | 2017-06-19 18:01:34 -0700 | [diff] [blame] | 440 | name: "py2-c-module-cmath", |
Nan Zhang | c393914 | 2017-05-25 23:21:27 -0700 | [diff] [blame] | 441 | defaults: ["py2-interp-defaults"], |
| 442 | srcs: [ |
| 443 | "Modules/cmathmodule.c", |
| 444 | "Modules/_math.c", |
| 445 | ], |
| 446 | } |
| 447 | |
| 448 | cc_library_static { |
Nan Zhang | ced2751 | 2017-06-19 18:01:34 -0700 | [diff] [blame] | 449 | name: "py2-c-module-math", |
Nan Zhang | c393914 | 2017-05-25 23:21:27 -0700 | [diff] [blame] | 450 | defaults: ["py2-interp-defaults"], |
| 451 | srcs: [ |
| 452 | "Modules/mathmodule.c", |
| 453 | "Modules/_math.c", |
| 454 | ], |
| 455 | } |
| 456 | |
| 457 | cc_library_static { |
Nan Zhang | ced2751 | 2017-06-19 18:01:34 -0700 | [diff] [blame] | 458 | name: "py2-c-module-_struct", |
Nan Zhang | c393914 | 2017-05-25 23:21:27 -0700 | [diff] [blame] | 459 | defaults: ["py2-interp-defaults"], |
| 460 | srcs: [ |
| 461 | "Modules/_struct.c", |
| 462 | ], |
| 463 | } |
| 464 | |
| 465 | cc_library_static { |
Nan Zhang | ced2751 | 2017-06-19 18:01:34 -0700 | [diff] [blame] | 466 | name: "py2-c-module-time", |
Nan Zhang | c393914 | 2017-05-25 23:21:27 -0700 | [diff] [blame] | 467 | defaults: ["py2-interp-defaults"], |
| 468 | srcs: [ |
| 469 | "Modules/timemodule.c", |
| 470 | ], |
| 471 | } |
| 472 | |
| 473 | cc_library_static { |
Nan Zhang | ced2751 | 2017-06-19 18:01:34 -0700 | [diff] [blame] | 474 | name: "py2-c-module-operator", |
Nan Zhang | c393914 | 2017-05-25 23:21:27 -0700 | [diff] [blame] | 475 | defaults: ["py2-interp-defaults"], |
| 476 | srcs: [ |
| 477 | "Modules/operator.c", |
| 478 | ], |
| 479 | } |
| 480 | |
| 481 | cc_library_static { |
Nan Zhang | ced2751 | 2017-06-19 18:01:34 -0700 | [diff] [blame] | 482 | name: "py2-c-module-_testcapi", |
Nan Zhang | c393914 | 2017-05-25 23:21:27 -0700 | [diff] [blame] | 483 | defaults: ["py2-interp-defaults"], |
| 484 | srcs: [ |
| 485 | "Modules/_testcapimodule.c", |
| 486 | ], |
| 487 | } |
| 488 | |
| 489 | cc_library_static { |
Nan Zhang | ced2751 | 2017-06-19 18:01:34 -0700 | [diff] [blame] | 490 | name: "py2-c-module-_random", |
Nan Zhang | c393914 | 2017-05-25 23:21:27 -0700 | [diff] [blame] | 491 | defaults: ["py2-interp-defaults"], |
| 492 | srcs: [ |
| 493 | "Modules/_randommodule.c", |
| 494 | ], |
| 495 | } |
| 496 | |
| 497 | cc_library_static { |
Nan Zhang | ced2751 | 2017-06-19 18:01:34 -0700 | [diff] [blame] | 498 | name: "py2-c-module-_collections", |
Nan Zhang | c393914 | 2017-05-25 23:21:27 -0700 | [diff] [blame] | 499 | defaults: ["py2-interp-defaults"], |
| 500 | srcs: [ |
| 501 | "Modules/_collectionsmodule.c", |
| 502 | ], |
| 503 | } |
| 504 | |
| 505 | cc_library_static { |
Nan Zhang | ced2751 | 2017-06-19 18:01:34 -0700 | [diff] [blame] | 506 | name: "py2-c-module-_heapq", |
Nan Zhang | c393914 | 2017-05-25 23:21:27 -0700 | [diff] [blame] | 507 | defaults: ["py2-interp-defaults"], |
| 508 | srcs: [ |
| 509 | "Modules/_heapqmodule.c", |
| 510 | ], |
| 511 | } |
| 512 | |
| 513 | cc_library_static { |
Nan Zhang | ced2751 | 2017-06-19 18:01:34 -0700 | [diff] [blame] | 514 | name: "py2-c-module-itertools", |
Nan Zhang | c393914 | 2017-05-25 23:21:27 -0700 | [diff] [blame] | 515 | defaults: ["py2-interp-defaults"], |
| 516 | srcs: [ |
| 517 | "Modules/itertoolsmodule.c", |
| 518 | ], |
| 519 | } |
| 520 | |
| 521 | cc_library_static { |
Nan Zhang | ced2751 | 2017-06-19 18:01:34 -0700 | [diff] [blame] | 522 | name: "py2-c-module-strop", |
Nan Zhang | c393914 | 2017-05-25 23:21:27 -0700 | [diff] [blame] | 523 | defaults: ["py2-interp-defaults"], |
| 524 | srcs: [ |
| 525 | "Modules/stropmodule.c", |
| 526 | ], |
| 527 | } |
| 528 | |
| 529 | cc_library_static { |
Nan Zhang | ced2751 | 2017-06-19 18:01:34 -0700 | [diff] [blame] | 530 | name: "py2-c-module-_functools", |
Nan Zhang | c393914 | 2017-05-25 23:21:27 -0700 | [diff] [blame] | 531 | defaults: ["py2-interp-defaults"], |
| 532 | srcs: [ |
| 533 | "Modules/_functoolsmodule.c", |
| 534 | ], |
| 535 | } |
| 536 | |
| 537 | cc_library_static { |
Nan Zhang | ced2751 | 2017-06-19 18:01:34 -0700 | [diff] [blame] | 538 | name: "py2-c-module-datetime", |
Nan Zhang | c393914 | 2017-05-25 23:21:27 -0700 | [diff] [blame] | 539 | defaults: ["py2-interp-defaults"], |
| 540 | srcs: [ |
| 541 | "Modules/datetimemodule.c", |
| 542 | ], |
| 543 | } |
| 544 | |
| 545 | cc_library_static { |
Nan Zhang | ced2751 | 2017-06-19 18:01:34 -0700 | [diff] [blame] | 546 | name: "py2-c-module-_bisect", |
Nan Zhang | c393914 | 2017-05-25 23:21:27 -0700 | [diff] [blame] | 547 | defaults: ["py2-interp-defaults"], |
| 548 | srcs: [ |
| 549 | "Modules/_bisectmodule.c", |
| 550 | ], |
| 551 | } |
| 552 | |
| 553 | cc_library_static { |
Nan Zhang | ced2751 | 2017-06-19 18:01:34 -0700 | [diff] [blame] | 554 | name: "py2-c-module-unicodedata", |
Nan Zhang | c393914 | 2017-05-25 23:21:27 -0700 | [diff] [blame] | 555 | defaults: ["py2-interp-defaults"], |
| 556 | srcs: [ |
| 557 | "Modules/unicodedata.c", |
| 558 | ], |
| 559 | } |
| 560 | |
| 561 | cc_library_static { |
Nan Zhang | ced2751 | 2017-06-19 18:01:34 -0700 | [diff] [blame] | 562 | name: "py2-c-module-_io", |
Nan Zhang | c393914 | 2017-05-25 23:21:27 -0700 | [diff] [blame] | 563 | defaults: ["py2-interp-defaults"], |
| 564 | srcs: [ |
| 565 | "Modules/_io/bufferedio.c", |
| 566 | "Modules/_io/bytesio.c", |
| 567 | "Modules/_io/fileio.c", |
| 568 | "Modules/_io/iobase.c", |
| 569 | "Modules/_io/_iomodule.c", |
| 570 | "Modules/_io/stringio.c", |
| 571 | "Modules/_io/textio.c", |
| 572 | ], |
| 573 | local_include_dirs: [ |
| 574 | "Modules/_io", |
| 575 | ], |
| 576 | } |
| 577 | |
| 578 | cc_library_static { |
Nan Zhang | ced2751 | 2017-06-19 18:01:34 -0700 | [diff] [blame] | 579 | name: "py2-c-module-fcntl", |
Nan Zhang | c393914 | 2017-05-25 23:21:27 -0700 | [diff] [blame] | 580 | defaults: ["py2-interp-defaults"], |
| 581 | srcs: [ |
| 582 | "Modules/fcntlmodule.c", |
| 583 | ], |
| 584 | } |
| 585 | |
| 586 | cc_library_static { |
Nan Zhang | ced2751 | 2017-06-19 18:01:34 -0700 | [diff] [blame] | 587 | name: "py2-c-module-select", |
Nan Zhang | c393914 | 2017-05-25 23:21:27 -0700 | [diff] [blame] | 588 | defaults: ["py2-interp-defaults"], |
| 589 | srcs: [ |
| 590 | "Modules/selectmodule.c", |
| 591 | ], |
| 592 | } |
| 593 | |
| 594 | cc_library_static { |
Nan Zhang | ced2751 | 2017-06-19 18:01:34 -0700 | [diff] [blame] | 595 | name: "py2-c-module-mmap", |
Nan Zhang | c393914 | 2017-05-25 23:21:27 -0700 | [diff] [blame] | 596 | defaults: ["py2-interp-defaults"], |
| 597 | srcs: [ |
| 598 | "Modules/mmapmodule.c", |
| 599 | ], |
| 600 | } |
| 601 | |
| 602 | cc_library_static { |
Nan Zhang | ced2751 | 2017-06-19 18:01:34 -0700 | [diff] [blame] | 603 | name: "py2-c-module-_csv", |
Nan Zhang | c393914 | 2017-05-25 23:21:27 -0700 | [diff] [blame] | 604 | defaults: ["py2-interp-defaults"], |
| 605 | srcs: [ |
| 606 | "Modules/_csv.c", |
| 607 | ], |
| 608 | } |
| 609 | |
| 610 | cc_library_static { |
Nan Zhang | ced2751 | 2017-06-19 18:01:34 -0700 | [diff] [blame] | 611 | name: "py2-c-module-_socket", |
Nan Zhang | c393914 | 2017-05-25 23:21:27 -0700 | [diff] [blame] | 612 | defaults: ["py2-interp-defaults"], |
| 613 | srcs: [ |
| 614 | "Modules/socketmodule.c", |
| 615 | "Modules/timemodule.c", |
| 616 | ], |
| 617 | } |
| 618 | |
| 619 | cc_library_static { |
Nan Zhang | ced2751 | 2017-06-19 18:01:34 -0700 | [diff] [blame] | 620 | name: "py2-c-module-termios", |
Nan Zhang | c393914 | 2017-05-25 23:21:27 -0700 | [diff] [blame] | 621 | defaults: ["py2-interp-defaults"], |
| 622 | srcs: [ |
| 623 | "Modules/termios.c", |
| 624 | ], |
| 625 | } |
| 626 | |
| 627 | cc_library_static { |
Dan Willemsen | dbcebe0 | 2019-01-07 18:07:24 -0800 | [diff] [blame] | 628 | name: "py2-c-module-_ssl", |
| 629 | defaults: ["py2-interp-defaults"], |
| 630 | srcs: ["Modules/_ssl.c"], |
| 631 | cflags: ["-Wno-incompatible-pointer-types-discards-qualifiers"], |
| 632 | static_libs: [ |
| 633 | "libssl", |
Colin Cross | f67325c | 2019-09-18 11:05:54 -0700 | [diff] [blame] | 634 | "libcrypto_static", |
Dan Willemsen | dbcebe0 | 2019-01-07 18:07:24 -0800 | [diff] [blame] | 635 | ], |
| 636 | } |
| 637 | |
| 638 | cc_library_static { |
Nan Zhang | ced2751 | 2017-06-19 18:01:34 -0700 | [diff] [blame] | 639 | name: "py2-c-module-_md5", |
Nan Zhang | c393914 | 2017-05-25 23:21:27 -0700 | [diff] [blame] | 640 | defaults: ["py2-interp-defaults"], |
| 641 | srcs: [ |
| 642 | "Modules/md5module.c", |
| 643 | "Modules/md5.c", |
| 644 | ], |
| 645 | } |
| 646 | |
| 647 | cc_library_static { |
Nan Zhang | ced2751 | 2017-06-19 18:01:34 -0700 | [diff] [blame] | 648 | name: "py2-c-module-_sha", |
Nan Zhang | c393914 | 2017-05-25 23:21:27 -0700 | [diff] [blame] | 649 | defaults: ["py2-interp-defaults"], |
| 650 | srcs: [ |
| 651 | "Modules/shamodule.c", |
| 652 | ], |
| 653 | } |
| 654 | |
| 655 | cc_library_static { |
Nan Zhang | ced2751 | 2017-06-19 18:01:34 -0700 | [diff] [blame] | 656 | name: "py2-c-module-_sha256", |
Nan Zhang | c393914 | 2017-05-25 23:21:27 -0700 | [diff] [blame] | 657 | defaults: ["py2-interp-defaults"], |
| 658 | srcs: [ |
| 659 | "Modules/sha256module.c", |
| 660 | ], |
| 661 | } |
| 662 | |
| 663 | cc_library_static { |
Nan Zhang | ced2751 | 2017-06-19 18:01:34 -0700 | [diff] [blame] | 664 | name: "py2-c-module-_sha512", |
Nan Zhang | c393914 | 2017-05-25 23:21:27 -0700 | [diff] [blame] | 665 | defaults: ["py2-interp-defaults"], |
| 666 | srcs: [ |
| 667 | "Modules/sha512module.c", |
| 668 | ], |
| 669 | } |
| 670 | |
| 671 | cc_library_static { |
Nan Zhang | ced2751 | 2017-06-19 18:01:34 -0700 | [diff] [blame] | 672 | name: "py2-c-module-binascii", |
Nan Zhang | c393914 | 2017-05-25 23:21:27 -0700 | [diff] [blame] | 673 | defaults: ["py2-interp-defaults"], |
| 674 | srcs: [ |
| 675 | "Modules/binascii.c", |
| 676 | ], |
| 677 | } |
| 678 | |
| 679 | cc_library_static { |
Nan Zhang | ced2751 | 2017-06-19 18:01:34 -0700 | [diff] [blame] | 680 | name: "py2-c-module-parser", |
Nan Zhang | c393914 | 2017-05-25 23:21:27 -0700 | [diff] [blame] | 681 | defaults: ["py2-interp-defaults"], |
| 682 | srcs: [ |
| 683 | "Modules/parsermodule.c", |
| 684 | ], |
| 685 | } |
| 686 | |
| 687 | cc_library_static { |
Nan Zhang | ced2751 | 2017-06-19 18:01:34 -0700 | [diff] [blame] | 688 | name: "py2-c-module-cStringIO", |
Nan Zhang | c393914 | 2017-05-25 23:21:27 -0700 | [diff] [blame] | 689 | defaults: ["py2-interp-defaults"], |
| 690 | srcs: [ |
| 691 | "Modules/cStringIO.c", |
| 692 | ], |
| 693 | } |
| 694 | |
| 695 | cc_library_static { |
Nan Zhang | ced2751 | 2017-06-19 18:01:34 -0700 | [diff] [blame] | 696 | name: "py2-c-module-cPickle", |
Nan Zhang | c393914 | 2017-05-25 23:21:27 -0700 | [diff] [blame] | 697 | defaults: ["py2-interp-defaults"], |
| 698 | srcs: [ |
| 699 | "Modules/cPickle.c", |
| 700 | ], |
| 701 | } |
| 702 | |
| 703 | cc_library_static { |
Nan Zhang | ced2751 | 2017-06-19 18:01:34 -0700 | [diff] [blame] | 704 | name: "py2-c-module-xxsubtype", |
Nan Zhang | c393914 | 2017-05-25 23:21:27 -0700 | [diff] [blame] | 705 | defaults: ["py2-interp-defaults"], |
| 706 | srcs: [ |
| 707 | "Modules/xxsubtype.c", |
| 708 | ], |
| 709 | } |
| 710 | |
| 711 | cc_library_static { |
Nan Zhang | ced2751 | 2017-06-19 18:01:34 -0700 | [diff] [blame] | 712 | name: "py2-c-module-future_builtins", |
Nan Zhang | c393914 | 2017-05-25 23:21:27 -0700 | [diff] [blame] | 713 | defaults: ["py2-interp-defaults"], |
| 714 | srcs: [ |
| 715 | "Modules/future_builtins.c", |
| 716 | ], |
| 717 | } |
| 718 | |
| 719 | cc_library_static { |
Nan Zhang | ced2751 | 2017-06-19 18:01:34 -0700 | [diff] [blame] | 720 | name: "py2-c-module-_json", |
Nan Zhang | c393914 | 2017-05-25 23:21:27 -0700 | [diff] [blame] | 721 | defaults: ["py2-interp-defaults"], |
| 722 | srcs: [ |
| 723 | "Modules/_json.c", |
| 724 | ], |
| 725 | } |
| 726 | |
| 727 | cc_library_static { |
Nan Zhang | ced2751 | 2017-06-19 18:01:34 -0700 | [diff] [blame] | 728 | name: "py2-c-module-_hotshot", |
Nan Zhang | c393914 | 2017-05-25 23:21:27 -0700 | [diff] [blame] | 729 | defaults: ["py2-interp-defaults"], |
| 730 | srcs: [ |
| 731 | "Modules/_hotshot.c", |
| 732 | ], |
| 733 | } |
| 734 | |
| 735 | cc_library_static { |
Nan Zhang | ced2751 | 2017-06-19 18:01:34 -0700 | [diff] [blame] | 736 | name: "py2-c-module-_lsprof", |
Nan Zhang | c393914 | 2017-05-25 23:21:27 -0700 | [diff] [blame] | 737 | defaults: ["py2-interp-defaults"], |
| 738 | srcs: [ |
| 739 | "Modules/_lsprof.c", |
| 740 | "Modules/rotatingtree.c", |
| 741 | ], |
| 742 | } |
| 743 | |
| 744 | cc_library_static { |
Nan Zhang | ced2751 | 2017-06-19 18:01:34 -0700 | [diff] [blame] | 745 | name: "py2-c-module-grp", |
Nan Zhang | c393914 | 2017-05-25 23:21:27 -0700 | [diff] [blame] | 746 | defaults: ["py2-interp-defaults"], |
| 747 | srcs: [ |
| 748 | "Modules/grpmodule.c", |
| 749 | "Modules/rotatingtree.c", |
| 750 | ], |
| 751 | } |
| 752 | |
| 753 | cc_library_static { |
Nan Zhang | ced2751 | 2017-06-19 18:01:34 -0700 | [diff] [blame] | 754 | name: "py2-c-module-syslog", |
Nan Zhang | c393914 | 2017-05-25 23:21:27 -0700 | [diff] [blame] | 755 | defaults: ["py2-interp-defaults"], |
| 756 | srcs: [ |
| 757 | "Modules/syslogmodule.c", |
| 758 | ], |
| 759 | } |
| 760 | |
| 761 | cc_library_static { |
Nan Zhang | ced2751 | 2017-06-19 18:01:34 -0700 | [diff] [blame] | 762 | name: "py2-c-module-audioop", |
Nan Zhang | c393914 | 2017-05-25 23:21:27 -0700 | [diff] [blame] | 763 | defaults: ["py2-interp-defaults"], |
| 764 | srcs: [ |
| 765 | "Modules/audioop.c", |
| 766 | ], |
| 767 | } |
| 768 | |
| 769 | cc_library_static { |
Nan Zhang | ced2751 | 2017-06-19 18:01:34 -0700 | [diff] [blame] | 770 | name: "py2-c-module-resource", |
Nan Zhang | c393914 | 2017-05-25 23:21:27 -0700 | [diff] [blame] | 771 | defaults: ["py2-interp-defaults"], |
| 772 | srcs: [ |
| 773 | "Modules/resource.c", |
| 774 | ], |
| 775 | } |
| 776 | |
| 777 | cc_library_static { |
Nan Zhang | ced2751 | 2017-06-19 18:01:34 -0700 | [diff] [blame] | 778 | name: "py2-c-module-_multibytecodec", |
Nan Zhang | c393914 | 2017-05-25 23:21:27 -0700 | [diff] [blame] | 779 | defaults: ["py2-interp-defaults"], |
| 780 | srcs: [ |
| 781 | "Modules/cjkcodecs/multibytecodec.c", |
| 782 | ], |
| 783 | } |
| 784 | |
| 785 | cc_library_static { |
Nan Zhang | d5c4d4a | 2017-07-19 16:22:00 -0700 | [diff] [blame] | 786 | name: "py2-c-module-_codecs_kr", |
| 787 | defaults: ["py2-interp-defaults"], |
| 788 | srcs: ["Modules/cjkcodecs/_codecs_kr.c"], |
| 789 | } |
| 790 | |
| 791 | cc_library_static { |
| 792 | name: "py2-c-module-_codecs_jp", |
| 793 | defaults: ["py2-interp-defaults"], |
| 794 | srcs: ["Modules/cjkcodecs/_codecs_jp.c"], |
| 795 | } |
| 796 | |
| 797 | cc_library_static { |
| 798 | name: "py2-c-module-_codecs_cn", |
| 799 | defaults: ["py2-interp-defaults"], |
| 800 | srcs: ["Modules/cjkcodecs/_codecs_cn.c"], |
| 801 | } |
| 802 | |
| 803 | cc_library_static { |
| 804 | name: "py2-c-module-_codecs_tw", |
| 805 | defaults: ["py2-interp-defaults"], |
| 806 | srcs: ["Modules/cjkcodecs/_codecs_tw.c"], |
| 807 | } |
| 808 | |
| 809 | cc_library_static { |
| 810 | name: "py2-c-module-_codecs_hk", |
| 811 | defaults: ["py2-interp-defaults"], |
| 812 | srcs: ["Modules/cjkcodecs/_codecs_hk.c"], |
| 813 | } |
| 814 | |
| 815 | cc_library_static { |
| 816 | name: "py2-c-module-_codecs_iso2022", |
| 817 | defaults: ["py2-interp-defaults"], |
| 818 | srcs: ["Modules/cjkcodecs/_codecs_iso2022.c"], |
| 819 | } |
| 820 | |
| 821 | cc_library_static { |
Nan Zhang | ced2751 | 2017-06-19 18:01:34 -0700 | [diff] [blame] | 822 | name: "py2-c-module-_multiprocessing", |
Nan Zhang | c393914 | 2017-05-25 23:21:27 -0700 | [diff] [blame] | 823 | defaults: ["py2-interp-defaults"], |
| 824 | srcs: [ |
| 825 | "Modules/_multiprocessing/multiprocessing.c", |
| 826 | "Modules/_multiprocessing/semaphore.c", |
| 827 | "Modules/_multiprocessing/socket_connection.c", |
| 828 | ], |
| 829 | } |
Nan Zhang | ced2751 | 2017-06-19 18:01:34 -0700 | [diff] [blame] | 830 | |
| 831 | cc_library_static { |
| 832 | name: "py2-c-module-zlib", |
| 833 | defaults: [ |
| 834 | "py2-interp-defaults", |
| 835 | ], |
| 836 | cflags: [ |
| 837 | "-DUSE_ZLIB_CRC32", |
| 838 | ], |
| 839 | srcs: [ |
| 840 | "Modules/zlibmodule.c", |
| 841 | ], |
| 842 | static_libs: [ |
| 843 | "libz", |
| 844 | ], |
| 845 | } |
Nan Zhang | d5c4d4a | 2017-07-19 16:22:00 -0700 | [diff] [blame] | 846 | |
| 847 | cc_library_static { |
| 848 | name: "py2-c-module-pyexpat", |
| 849 | defaults: [ |
| 850 | "py2-interp-defaults", |
| 851 | ], |
| 852 | cflags: [ |
| 853 | "-DUSE_PYEXPAT_CAPI", |
| 854 | ], |
| 855 | srcs: [ |
| 856 | "Modules/pyexpat.c", |
| 857 | ], |
| 858 | static_libs: [ |
| 859 | "libexpat", |
| 860 | ], |
| 861 | } |
| 862 | |
| 863 | cc_library_static { |
| 864 | name: "py2-c-module-_sqlite3", |
| 865 | defaults: [ |
| 866 | "py2-interp-defaults", |
| 867 | ], |
| 868 | cflags: [ |
| 869 | "-DMODULE_NAME=\"sqlite3\"", |
| 870 | "-DSQLITE_OMIT_LOAD_EXTENSION", |
| 871 | "-Wno-format-security", |
| 872 | "-Wno-type-limits", |
| 873 | "-Wno-char-subscripts", |
| 874 | ], |
| 875 | local_include_dirs: [ |
| 876 | "Modules/_sqlite", |
| 877 | ], |
| 878 | srcs: [ |
| 879 | "Modules/_sqlite/cache.c", |
| 880 | "Modules/_sqlite/connection.c", |
| 881 | "Modules/_sqlite/cursor.c", |
| 882 | "Modules/_sqlite/microprotocols.c", |
| 883 | "Modules/_sqlite/module.c", |
| 884 | "Modules/_sqlite/prepare_protocol.c", |
| 885 | "Modules/_sqlite/row.c", |
| 886 | "Modules/_sqlite/statement.c", |
| 887 | "Modules/_sqlite/util.c", |
| 888 | ], |
Nan Zhang | 33bb4bb | 2017-12-01 20:00:54 +0000 | [diff] [blame] | 889 | target: { |
Alex Light | 6f3263d | 2019-02-27 14:37:14 -0800 | [diff] [blame] | 890 | host: { |
Nan Zhang | 33bb4bb | 2017-12-01 20:00:54 +0000 | [diff] [blame] | 891 | static_libs: [ |
| 892 | "libsqlite", |
| 893 | ], |
| 894 | }, |
| 895 | android: { |
| 896 | shared_libs: [ |
| 897 | "libsqlite", |
Dan Willemsen | 04e3910 | 2019-02-14 21:00:06 -0800 | [diff] [blame] | 898 | ], |
Nan Zhang | 33bb4bb | 2017-12-01 20:00:54 +0000 | [diff] [blame] | 899 | }, |
| 900 | }, |
Nan Zhang | d5c4d4a | 2017-07-19 16:22:00 -0700 | [diff] [blame] | 901 | } |
| 902 | |
| 903 | cc_library_static { |
| 904 | name: "py2-c-module-_ctypes_test", |
| 905 | defaults: ["py2-interp-defaults"], |
| 906 | srcs: ["Modules/_ctypes/_ctypes_test.c"], |
| 907 | } |
| 908 | |
Nan Zhang | d5c4d4a | 2017-07-19 16:22:00 -0700 | [diff] [blame] | 909 | cc_library_static { |
| 910 | name: "py2-c-module-_ctypes", |
| 911 | defaults: [ |
| 912 | "py2-interp-defaults", |
| 913 | ], |
| 914 | local_include_dirs: [ |
Nan Zhang | d5c4d4a | 2017-07-19 16:22:00 -0700 | [diff] [blame] | 915 | "Modules/_ctypes/libffi/include", |
| 916 | ], |
| 917 | srcs: [ |
| 918 | "Modules/_ctypes/_ctypes.c", |
| 919 | "Modules/_ctypes/callbacks.c", |
| 920 | "Modules/_ctypes/callproc.c", |
| 921 | "Modules/_ctypes/stgdict.c", |
| 922 | "Modules/_ctypes/cfield.c", |
| 923 | "Modules/_ctypes/libffi/src/prep_cif.c", |
| 924 | "Modules/_ctypes/libffi/src/closures.c", |
| 925 | ], |
| 926 | arch: { |
| 927 | x86_64: { |
| 928 | local_include_dirs: [ |
| 929 | "Modules/_ctypes/libffi/src/x86", |
| 930 | ], |
| 931 | srcs: [ |
| 932 | "Modules/_ctypes/libffi/src/x86/ffi64.c", |
Nan Zhang | d5c4d4a | 2017-07-19 16:22:00 -0700 | [diff] [blame] | 933 | "Modules/_ctypes/libffi/src/x86/ffi.c", |
| 934 | "Modules/_ctypes/libffi/src/x86/sysv.S", |
| 935 | ], |
| 936 | }, |
Nan Zhang | 33bb4bb | 2017-12-01 20:00:54 +0000 | [diff] [blame] | 937 | x86: { |
| 938 | local_include_dirs: [ |
| 939 | "Modules/_ctypes/libffi/src/x86", |
| 940 | ], |
| 941 | srcs: [ |
| 942 | "Modules/_ctypes/libffi/src/x86/ffi.c", |
| 943 | "Modules/_ctypes/libffi/src/x86/sysv.S", |
| 944 | ], |
| 945 | }, |
| 946 | arm: { |
| 947 | local_include_dirs: [ |
| 948 | "android_arm/libffi", |
| 949 | "Modules/_ctypes/libffi/src/arm", |
| 950 | ], |
| 951 | srcs: [ |
| 952 | "Modules/_ctypes/libffi/src/arm/ffi.c", |
| 953 | "Modules/_ctypes/libffi/src/arm/sysv.S", |
| 954 | "Modules/_ctypes/libffi/src/arm/trampoline.S", |
Dan Willemsen | 04e3910 | 2019-02-14 21:00:06 -0800 | [diff] [blame] | 955 | ], |
Nan Zhang | 33bb4bb | 2017-12-01 20:00:54 +0000 | [diff] [blame] | 956 | }, |
| 957 | arm64: { |
| 958 | // arithmetic on a pointer in _ctypes/libffi/src/aarch64/ffi.c |
| 959 | cflags: ["-Wno-pointer-arith"], |
| 960 | local_include_dirs: [ |
| 961 | "android_arm64/libffi", |
| 962 | "Modules/_ctypes/libffi/src/aarch64", |
| 963 | ], |
| 964 | srcs: [ |
| 965 | "Modules/_ctypes/libffi/src/aarch64/ffi.c", |
| 966 | "Modules/_ctypes/libffi/src/aarch64/sysv.S", |
Dan Willemsen | 04e3910 | 2019-02-14 21:00:06 -0800 | [diff] [blame] | 967 | ], |
Nan Zhang | 33bb4bb | 2017-12-01 20:00:54 +0000 | [diff] [blame] | 968 | }, |
Nan Zhang | d5c4d4a | 2017-07-19 16:22:00 -0700 | [diff] [blame] | 969 | }, |
Dan Willemsen | c88c080 | 2017-09-25 14:33:27 -0700 | [diff] [blame] | 970 | target: { |
| 971 | // Regenerate include dirs with android_regen.sh |
| 972 | darwin_x86_64: { |
| 973 | local_include_dirs: ["darwin_x86_64/libffi"], |
| 974 | srcs: [ |
| 975 | "Modules/_ctypes/libffi/src/x86/darwin.S", |
| 976 | "Modules/_ctypes/libffi/src/x86/darwin64.S", |
| 977 | ], |
| 978 | }, |
Alex Light | 6f3263d | 2019-02-27 14:37:14 -0800 | [diff] [blame] | 979 | linux_bionic: { |
| 980 | local_include_dirs: ["linux_x86_64/libffi"], |
| 981 | srcs: [ |
| 982 | "Modules/_ctypes/libffi/src/x86/unix64.S", |
| 983 | ], |
| 984 | }, |
Dan Willemsen | e41d4ce | 2017-10-02 10:41:09 -0700 | [diff] [blame] | 985 | linux_glibc_x86_64: { |
Dan Willemsen | c88c080 | 2017-09-25 14:33:27 -0700 | [diff] [blame] | 986 | local_include_dirs: ["linux_x86_64/libffi"], |
| 987 | srcs: [ |
| 988 | "Modules/_ctypes/libffi/src/x86/unix64.S", |
| 989 | ], |
| 990 | }, |
Nan Zhang | 33bb4bb | 2017-12-01 20:00:54 +0000 | [diff] [blame] | 991 | android_x86: { |
| 992 | local_include_dirs: ["android_x86/libffi"], |
| 993 | srcs: [ |
| 994 | "Modules/_ctypes/libffi/src/x86/win32.S", |
| 995 | ], |
| 996 | }, |
| 997 | android_x86_64: { |
| 998 | local_include_dirs: ["android_x86_64/libffi"], |
| 999 | srcs: [ |
| 1000 | "Modules/_ctypes/libffi/src/x86/unix64.S", |
| 1001 | ], |
| 1002 | }, |
Dan Willemsen | c88c080 | 2017-09-25 14:33:27 -0700 | [diff] [blame] | 1003 | }, |
Nan Zhang | d5c4d4a | 2017-07-19 16:22:00 -0700 | [diff] [blame] | 1004 | } |
Dan Willemsen | a7c6b23 | 2019-02-20 10:43:11 -0800 | [diff] [blame] | 1005 | |
| 1006 | cc_library_host_static { |
| 1007 | name: "py2-c-module-_scproxy", |
| 1008 | defaults: ["py2-interp-defaults"], |
| 1009 | srcs: ["Mac/Modules/_scproxy.c"], |
| 1010 | target: { |
| 1011 | linux: { |
| 1012 | enabled: false, |
| 1013 | }, |
| 1014 | }, |
| 1015 | } |