Commit c3fa21f
committed
windows: link _ctypes to libffi in static builds
CPython 3.8 moved to an out-of-tree libffi. As far as I can tell, our
first official Python 3.8 static builds did not handle libffi correctly.
In 3.8 and 3.9 builds, we hacked up the Python project to link against
libffi.lib. This ensured the symbols were present at link time. However,
we didn't ship libffi.lib and the dependency of _ctypes on libffi.lib
wasn't captured in PYTHON.json. If we attempted to produce a new link
library from the object files + static libraries (such as what
PyOxidizer does), we'd get a linker error for missing libffi symbols.
This commit attempts to fix matters.
We now explicitly link the _ctypes extension to libffi.lib via
project files hackery. This dependency is captured in the metadata
so the link dependency is present in PYTHON.json. We also need to
manually copy libffi.lib into the build directory so it is
available.
Finally, we undo the dependency of pythoncore on libffi because I now
believe it is redundant with _ctypes. Although I'm not 100% confident
about this.
This should hopefully fix
indygreg/PyOxidizer#360.1 parent 4f5efbc commit c3fa21f
2 files changed
+34
-27
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
51 | 54 | | |
52 | 55 | | |
53 | 56 | | |
| |||
775 | 778 | | |
776 | 779 | | |
777 | 780 | | |
| 781 | + | |
778 | 782 | | |
779 | 783 | | |
780 | 784 | | |
| |||
892 | 896 | | |
893 | 897 | | |
894 | 898 | | |
895 | | - | |
896 | | - | |
897 | | - | |
898 | | - | |
899 | | - | |
900 | | - | |
901 | | - | |
902 | | - | |
903 | | - | |
904 | | - | |
905 | | - | |
906 | | - | |
907 | | - | |
908 | | - | |
909 | | - | |
910 | | - | |
911 | | - | |
912 | | - | |
913 | | - | |
914 | | - | |
915 | | - | |
916 | | - | |
917 | | - | |
918 | | - | |
919 | | - | |
920 | | - | |
921 | 899 | | |
922 | 900 | | |
923 | 901 | | |
| |||
2170 | 2148 | | |
2171 | 2149 | | |
2172 | 2150 | | |
| 2151 | + | |
| 2152 | + | |
| 2153 | + | |
| 2154 | + | |
| 2155 | + | |
| 2156 | + | |
| 2157 | + | |
2173 | 2158 | | |
2174 | 2159 | | |
2175 | 2160 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
359 | 359 | | |
360 | 360 | | |
361 | 361 | | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
362 | 375 | | |
363 | 376 | | |
364 | 377 | | |
| |||
563 | 576 | | |
564 | 577 | | |
565 | 578 | | |
| 579 | + | |
566 | 580 | | |
567 | 581 | | |
568 | 582 | | |
| |||
589 | 603 | | |
590 | 604 | | |
591 | 605 | | |
| 606 | + | |
| 607 | + | |
592 | 608 | | |
593 | 609 | | |
594 | 610 | | |
| |||
642 | 658 | | |
643 | 659 | | |
644 | 660 | | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
645 | 667 | | |
646 | 668 | | |
647 | 669 | | |
| |||
0 commit comments