|
50 | 50 | },
|
51 | 51 | "_bz2": {},
|
52 | 52 | "_ctypes": {
|
53 |
| - "shared_depends": ["libffi-7"], |
| 53 | + "shared_depends": ["libffi-8"], |
54 | 54 | "static_depends_no_project": ["libffi"],
|
55 | 55 | },
|
56 | 56 | "_decimal": {},
|
@@ -812,13 +812,28 @@ def hack_props(
|
812 | 812 |
|
813 | 813 | libffi_props = pcbuild_path / "libffi.props"
|
814 | 814 |
|
| 815 | + # Always use libffi-8 / 3.4.2. (Python <= 3.11 use libffi-7 by default.) |
| 816 | + try: |
| 817 | + static_replace_in_file( |
| 818 | + libffi_props, |
| 819 | + br"""<_LIBFFIDLL Include="$(libffiOutDir)\libffi-7.dll" />""", |
| 820 | + br"""<_LIBFFIDLL Include="$(libffiOutDir)\libffi-8.dll" />""", |
| 821 | + ) |
| 822 | + static_replace_in_file( |
| 823 | + libffi_props, |
| 824 | + br"<AdditionalDependencies>libffi-7.lib;%(AdditionalDependencies)</AdditionalDependencies>", |
| 825 | + br"<AdditionalDependencies>libffi-8.lib;%(AdditionalDependencies)</AdditionalDependencies>", |
| 826 | + ) |
| 827 | + except NoSearchStringError: |
| 828 | + pass |
| 829 | + |
815 | 830 | if static:
|
816 |
| - # For some reason the built .lib doesn't have the -7 suffix in |
| 831 | + # For some reason the built .lib doesn't have the -8 suffix in |
817 | 832 | # static build mode. This is possibly a side-effect of CPython's
|
818 | 833 | # libffi build script not officially supporting static-only builds.
|
819 | 834 | static_replace_in_file(
|
820 | 835 | libffi_props,
|
821 |
| - b"<AdditionalDependencies>libffi-7.lib;%(AdditionalDependencies)</AdditionalDependencies>", |
| 836 | + b"<AdditionalDependencies>libffi-8.lib;%(AdditionalDependencies)</AdditionalDependencies>", |
822 | 837 | b"<AdditionalDependencies>libffi.lib;%(AdditionalDependencies)</AdditionalDependencies>",
|
823 | 838 | )
|
824 | 839 |
|
@@ -1593,7 +1608,7 @@ def build_libffi(
|
1593 | 1608 | "-c",
|
1594 | 1609 | "core.autocrlf=input",
|
1595 | 1610 | "checkout",
|
1596 |
| - "ed22026f39b37f892ded95d7b30e77dfb5126334", |
| 1611 | + "16fad4855b3d8c03b5910e405ff3a04395b39a98", |
1597 | 1612 | ],
|
1598 | 1613 | cwd=ffi_source_path,
|
1599 | 1614 | check=True,
|
|
0 commit comments