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