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 15subdirs = [ 16 "Lib", 17] 18 19cc_defaults { 20 name: "py2-interp-defaults", 21 cflags: [ 22 "-fwrapv", 23 "-O3", 24 "-Wall", 25 "-Wstrict-prototypes", 26 "-DPy_BUILD_CORE", 27 "-Werror", 28 "-Wno-invalid-source-encoding", 29 "-Wno-int-conversion", 30 "-Wno-missing-field-initializers", 31 "-Wno-null-pointer-arithmetic", 32 "-Wno-register", 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: { 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 }, 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 }, 56 android_x86_64: { 57 local_include_dirs: ["android_x86_64/pyconfig"], 58 }, 59 // Regenerate include dirs with android_regen.sh 60 darwin_x86_64: { 61 local_include_dirs: ["darwin_x86_64/pyconfig"], 62 cflags: [ 63 "-Wno-deprecated-declarations", 64 "-Wno-pointer-arith", 65 ], 66 }, 67 linux_glibc_x86: { 68 enabled: false, 69 }, 70 linux_glibc_x86_64: { 71 local_include_dirs: ["linux_x86_64/pyconfig"], 72 cflags: ["-Werror"], 73 }, 74 windows: { 75 enabled: false, 76 }, 77 }, 78 host_supported: true, 79 compile_multilib: "both", 80 multilib: { 81 lib32: { 82 suffix: "32", 83 }, 84 lib64: { 85 suffix: "64", 86 }, 87 }, 88} 89 90cc_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 110cc_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 156cc_library_static { 157 name: "py2-interp-python", 158 defaults: ["py2-interp-defaults"], 159 target: { 160 linux: { 161 cflags: [ 162 "-DPLATFORM=\"linux2\"", 163 ], 164 }, 165 darwin_x86_64: { 166 cflags: [ 167 "-DPLATFORM=\"darwin\"", 168 ], 169 }, 170 }, 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 219cc_defaults { 220 name: "py2-launcher-defaults", 221 defaults: ["py2-interp-defaults"], 222 cflags: [ 223 "-DVERSION=\"2.7\"", 224 "-DVPATH=\"\"", 225 "-DPREFIX=\"\"", 226 "-DEXEC_PREFIX=\"\"", 227 "-DPYTHONPATH=\"..:\"", 228 "-DANDROID_SKIP_ZIP_PATH", 229 "-DANDROID_SKIP_EXEC_PREFIX_PATH", 230 "-DANDROID_LIB_PYTHON_PATH=\"internal/stdlib\"", 231 "-DDATE=\"Dec 31 1969\"", 232 "-DTIME=\"23:59:59\"", 233 ], 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 }, 245 darwin: { 246 host_ldlibs: [ 247 "-framework SystemConfiguration", 248 "-framework CoreFoundation", 249 ], 250 }, 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 262cc_library_static { 263 name: "py2-launcher-lib", 264 defaults: ["py2-launcher-defaults"], 265 srcs: [ 266 "Modules/gcmodule.c", 267 "Modules/getpath.c", 268 "Modules/config.c", 269 "Modules/getbuildinfo.c", 270 // Default built-in extension py2-c-modules. 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", 281 "Modules/main.c", 282 ], 283 // NOTE: Please update Modules/config.c if new lib get added in the static_libs. 284 whole_static_libs: [ 285 // Be careful the order of these three static libraries below due to 286 // missing symbols issues. 287 "py2-interp-object", 288 "py2-interp-python", 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", 313 "py2-c-module-_ssl", 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", 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", 338 "py2-c-module-_multiprocessing", 339 "py2-c-module-zlib", 340 "py2-c-module-pyexpat", 341 "py2-c-module-_sqlite3", 342 "py2-c-module-_ctypes_test", 343 "py2-c-module-_ctypes", 344 ], 345 target: { 346 darwin: { 347 whole_static_libs: ["py2-c-module-_scproxy"], 348 }, 349 }, 350} 351 352cc_binary { 353 name: "py2-launcher", 354 defaults: ["py2-launcher-defaults"], 355 srcs: ["Launcher/launcher_main.cpp"], 356 static_libs: ["py2-launcher-lib"], 357} 358 359cc_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 367python_binary_host { 368 name: "py2-cmd", 369 autorun: false, 370 version: { 371 py2: { 372 enabled: true, 373 embedded_launcher: true, 374 }, 375 py3: { 376 enabled: false, 377 }, 378 }, 379} 380 381// Enabled extension py2-c-modules. 382 383cc_library_static { 384 name: "py2-c-module-array", 385 defaults: ["py2-interp-defaults"], 386 srcs: [ 387 "Modules/arraymodule.c", 388 ], 389} 390 391cc_library_static { 392 name: "py2-c-module-cmath", 393 defaults: ["py2-interp-defaults"], 394 srcs: [ 395 "Modules/cmathmodule.c", 396 "Modules/_math.c", 397 ], 398} 399 400cc_library_static { 401 name: "py2-c-module-math", 402 defaults: ["py2-interp-defaults"], 403 srcs: [ 404 "Modules/mathmodule.c", 405 "Modules/_math.c", 406 ], 407} 408 409cc_library_static { 410 name: "py2-c-module-_struct", 411 defaults: ["py2-interp-defaults"], 412 srcs: [ 413 "Modules/_struct.c", 414 ], 415} 416 417cc_library_static { 418 name: "py2-c-module-time", 419 defaults: ["py2-interp-defaults"], 420 srcs: [ 421 "Modules/timemodule.c", 422 ], 423} 424 425cc_library_static { 426 name: "py2-c-module-operator", 427 defaults: ["py2-interp-defaults"], 428 srcs: [ 429 "Modules/operator.c", 430 ], 431} 432 433cc_library_static { 434 name: "py2-c-module-_testcapi", 435 defaults: ["py2-interp-defaults"], 436 srcs: [ 437 "Modules/_testcapimodule.c", 438 ], 439} 440 441cc_library_static { 442 name: "py2-c-module-_random", 443 defaults: ["py2-interp-defaults"], 444 srcs: [ 445 "Modules/_randommodule.c", 446 ], 447} 448 449cc_library_static { 450 name: "py2-c-module-_collections", 451 defaults: ["py2-interp-defaults"], 452 srcs: [ 453 "Modules/_collectionsmodule.c", 454 ], 455} 456 457cc_library_static { 458 name: "py2-c-module-_heapq", 459 defaults: ["py2-interp-defaults"], 460 srcs: [ 461 "Modules/_heapqmodule.c", 462 ], 463} 464 465cc_library_static { 466 name: "py2-c-module-itertools", 467 defaults: ["py2-interp-defaults"], 468 srcs: [ 469 "Modules/itertoolsmodule.c", 470 ], 471} 472 473cc_library_static { 474 name: "py2-c-module-strop", 475 defaults: ["py2-interp-defaults"], 476 srcs: [ 477 "Modules/stropmodule.c", 478 ], 479} 480 481cc_library_static { 482 name: "py2-c-module-_functools", 483 defaults: ["py2-interp-defaults"], 484 srcs: [ 485 "Modules/_functoolsmodule.c", 486 ], 487} 488 489cc_library_static { 490 name: "py2-c-module-datetime", 491 defaults: ["py2-interp-defaults"], 492 srcs: [ 493 "Modules/datetimemodule.c", 494 ], 495} 496 497cc_library_static { 498 name: "py2-c-module-_bisect", 499 defaults: ["py2-interp-defaults"], 500 srcs: [ 501 "Modules/_bisectmodule.c", 502 ], 503} 504 505cc_library_static { 506 name: "py2-c-module-unicodedata", 507 defaults: ["py2-interp-defaults"], 508 srcs: [ 509 "Modules/unicodedata.c", 510 ], 511} 512 513cc_library_static { 514 name: "py2-c-module-_io", 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 530cc_library_static { 531 name: "py2-c-module-fcntl", 532 defaults: ["py2-interp-defaults"], 533 srcs: [ 534 "Modules/fcntlmodule.c", 535 ], 536} 537 538cc_library_static { 539 name: "py2-c-module-select", 540 defaults: ["py2-interp-defaults"], 541 srcs: [ 542 "Modules/selectmodule.c", 543 ], 544} 545 546cc_library_static { 547 name: "py2-c-module-mmap", 548 defaults: ["py2-interp-defaults"], 549 srcs: [ 550 "Modules/mmapmodule.c", 551 ], 552} 553 554cc_library_static { 555 name: "py2-c-module-_csv", 556 defaults: ["py2-interp-defaults"], 557 srcs: [ 558 "Modules/_csv.c", 559 ], 560} 561 562cc_library_static { 563 name: "py2-c-module-_socket", 564 defaults: ["py2-interp-defaults"], 565 srcs: [ 566 "Modules/socketmodule.c", 567 "Modules/timemodule.c", 568 ], 569} 570 571cc_library_static { 572 name: "py2-c-module-termios", 573 defaults: ["py2-interp-defaults"], 574 srcs: [ 575 "Modules/termios.c", 576 ], 577} 578 579cc_library_static { 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 590cc_library_static { 591 name: "py2-c-module-_md5", 592 defaults: ["py2-interp-defaults"], 593 srcs: [ 594 "Modules/md5module.c", 595 "Modules/md5.c", 596 ], 597} 598 599cc_library_static { 600 name: "py2-c-module-_sha", 601 defaults: ["py2-interp-defaults"], 602 srcs: [ 603 "Modules/shamodule.c", 604 ], 605} 606 607cc_library_static { 608 name: "py2-c-module-_sha256", 609 defaults: ["py2-interp-defaults"], 610 srcs: [ 611 "Modules/sha256module.c", 612 ], 613} 614 615cc_library_static { 616 name: "py2-c-module-_sha512", 617 defaults: ["py2-interp-defaults"], 618 srcs: [ 619 "Modules/sha512module.c", 620 ], 621} 622 623cc_library_static { 624 name: "py2-c-module-binascii", 625 defaults: ["py2-interp-defaults"], 626 srcs: [ 627 "Modules/binascii.c", 628 ], 629} 630 631cc_library_static { 632 name: "py2-c-module-parser", 633 defaults: ["py2-interp-defaults"], 634 srcs: [ 635 "Modules/parsermodule.c", 636 ], 637} 638 639cc_library_static { 640 name: "py2-c-module-cStringIO", 641 defaults: ["py2-interp-defaults"], 642 srcs: [ 643 "Modules/cStringIO.c", 644 ], 645} 646 647cc_library_static { 648 name: "py2-c-module-cPickle", 649 defaults: ["py2-interp-defaults"], 650 srcs: [ 651 "Modules/cPickle.c", 652 ], 653} 654 655cc_library_static { 656 name: "py2-c-module-xxsubtype", 657 defaults: ["py2-interp-defaults"], 658 srcs: [ 659 "Modules/xxsubtype.c", 660 ], 661} 662 663cc_library_static { 664 name: "py2-c-module-future_builtins", 665 defaults: ["py2-interp-defaults"], 666 srcs: [ 667 "Modules/future_builtins.c", 668 ], 669} 670 671cc_library_static { 672 name: "py2-c-module-_json", 673 defaults: ["py2-interp-defaults"], 674 srcs: [ 675 "Modules/_json.c", 676 ], 677} 678 679cc_library_static { 680 name: "py2-c-module-_hotshot", 681 defaults: ["py2-interp-defaults"], 682 srcs: [ 683 "Modules/_hotshot.c", 684 ], 685} 686 687cc_library_static { 688 name: "py2-c-module-_lsprof", 689 defaults: ["py2-interp-defaults"], 690 srcs: [ 691 "Modules/_lsprof.c", 692 "Modules/rotatingtree.c", 693 ], 694} 695 696cc_library_static { 697 name: "py2-c-module-grp", 698 defaults: ["py2-interp-defaults"], 699 srcs: [ 700 "Modules/grpmodule.c", 701 "Modules/rotatingtree.c", 702 ], 703} 704 705cc_library_static { 706 name: "py2-c-module-syslog", 707 defaults: ["py2-interp-defaults"], 708 srcs: [ 709 "Modules/syslogmodule.c", 710 ], 711} 712 713cc_library_static { 714 name: "py2-c-module-audioop", 715 defaults: ["py2-interp-defaults"], 716 srcs: [ 717 "Modules/audioop.c", 718 ], 719} 720 721cc_library_static { 722 name: "py2-c-module-resource", 723 defaults: ["py2-interp-defaults"], 724 srcs: [ 725 "Modules/resource.c", 726 ], 727} 728 729cc_library_static { 730 name: "py2-c-module-_multibytecodec", 731 defaults: ["py2-interp-defaults"], 732 srcs: [ 733 "Modules/cjkcodecs/multibytecodec.c", 734 ], 735} 736 737cc_library_static { 738 name: "py2-c-module-_codecs_kr", 739 defaults: ["py2-interp-defaults"], 740 srcs: ["Modules/cjkcodecs/_codecs_kr.c"], 741} 742 743cc_library_static { 744 name: "py2-c-module-_codecs_jp", 745 defaults: ["py2-interp-defaults"], 746 srcs: ["Modules/cjkcodecs/_codecs_jp.c"], 747} 748 749cc_library_static { 750 name: "py2-c-module-_codecs_cn", 751 defaults: ["py2-interp-defaults"], 752 srcs: ["Modules/cjkcodecs/_codecs_cn.c"], 753} 754 755cc_library_static { 756 name: "py2-c-module-_codecs_tw", 757 defaults: ["py2-interp-defaults"], 758 srcs: ["Modules/cjkcodecs/_codecs_tw.c"], 759} 760 761cc_library_static { 762 name: "py2-c-module-_codecs_hk", 763 defaults: ["py2-interp-defaults"], 764 srcs: ["Modules/cjkcodecs/_codecs_hk.c"], 765} 766 767cc_library_static { 768 name: "py2-c-module-_codecs_iso2022", 769 defaults: ["py2-interp-defaults"], 770 srcs: ["Modules/cjkcodecs/_codecs_iso2022.c"], 771} 772 773cc_library_static { 774 name: "py2-c-module-_multiprocessing", 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} 782 783cc_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} 798 799cc_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 815cc_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 ], 841 target: { 842 host: { 843 static_libs: [ 844 "libsqlite", 845 ], 846 }, 847 android: { 848 shared_libs: [ 849 "libsqlite", 850 ], 851 }, 852 }, 853} 854 855cc_library_static { 856 name: "py2-c-module-_ctypes_test", 857 defaults: ["py2-interp-defaults"], 858 srcs: ["Modules/_ctypes/_ctypes_test.c"], 859} 860 861cc_library_static { 862 name: "py2-c-module-_ctypes", 863 defaults: [ 864 "py2-interp-defaults", 865 ], 866 local_include_dirs: [ 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", 885 "Modules/_ctypes/libffi/src/x86/ffi.c", 886 "Modules/_ctypes/libffi/src/x86/sysv.S", 887 ], 888 }, 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", 907 ], 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", 919 ], 920 }, 921 }, 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 }, 931 linux_bionic: { 932 local_include_dirs: ["linux_x86_64/libffi"], 933 srcs: [ 934 "Modules/_ctypes/libffi/src/x86/unix64.S", 935 ], 936 }, 937 linux_glibc_x86_64: { 938 local_include_dirs: ["linux_x86_64/libffi"], 939 srcs: [ 940 "Modules/_ctypes/libffi/src/x86/unix64.S", 941 ], 942 }, 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 }, 955 }, 956} 957 958cc_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} 968