@@ -695,11 +695,7 @@ def copy_link_to_lib(p: pathlib.Path):
695
695
696
696
697
697
def hack_props (
698
- td : pathlib .Path ,
699
- pcbuild_path : pathlib .Path ,
700
- arch : str ,
701
- static : bool ,
702
- building_libffi : bool ,
698
+ td : pathlib .Path , pcbuild_path : pathlib .Path , arch : str , static : bool ,
703
699
):
704
700
# TODO can we pass props into msbuild.exe?
705
701
@@ -804,7 +800,7 @@ def hack_props(
804
800
805
801
libffi_props = pcbuild_path / "libffi.props"
806
802
807
- if static and building_libffi :
803
+ if static :
808
804
# For some reason the built .lib doesn't have the -7 suffix in
809
805
# static build mode. This is possibly a side-effect of CPython's
810
806
# libffi build script not officially supporting static-only builds.
@@ -824,19 +820,14 @@ def hack_project_files(
824
820
cpython_source_path : pathlib .Path ,
825
821
build_directory : str ,
826
822
static : bool ,
827
- building_libffi : bool ,
828
823
honor_allow_missing_preprocessor : bool ,
829
824
):
830
825
"""Hacks Visual Studio project files to work with our build."""
831
826
832
827
pcbuild_path = cpython_source_path / "PCbuild"
833
828
834
829
hack_props (
835
- td ,
836
- pcbuild_path ,
837
- build_directory ,
838
- static = static ,
839
- building_libffi = building_libffi ,
830
+ td , pcbuild_path , build_directory , static = static ,
840
831
)
841
832
842
833
# Our SQLite directory is named weirdly. This throws off version detection
@@ -907,7 +898,7 @@ def hack_project_files(
907
898
# hack pythoncore as a one-off to add the dependency. Ideally we would
908
899
# handle this when hacking the extension's project. But it is easier to
909
900
# do here.
910
- if static and building_libffi :
901
+ if static :
911
902
libffi_path = td / "libffi" / "libffi.lib"
912
903
try :
913
904
# Python 3.9 version
@@ -1907,7 +1898,7 @@ def build_cpython(
1907
1898
arch : str ,
1908
1899
profile ,
1909
1900
openssl_archive ,
1910
- libffi_archive = None ,
1901
+ libffi_archive ,
1911
1902
):
1912
1903
static = "static" in profile
1913
1904
pgo = "-pgo" in profile
@@ -1965,8 +1956,7 @@ def build_cpython(
1965
1956
for f in fs :
1966
1957
f .result ()
1967
1958
1968
- if libffi_archive :
1969
- extract_tar_to_directory (libffi_archive , td )
1959
+ extract_tar_to_directory (libffi_archive , td )
1970
1960
1971
1961
# We need all the OpenSSL library files in the same directory to appease
1972
1962
# install rules.
@@ -2006,7 +1996,6 @@ def build_cpython(
2006
1996
cpython_source_path ,
2007
1997
build_directory ,
2008
1998
static = static ,
2009
- building_libffi = libffi_archive is not None ,
2010
1999
honor_allow_missing_preprocessor = python_entry_name == "cpython-3.8" ,
2011
2000
)
2012
2001
hack_source_files (cpython_source_path , static = static )
0 commit comments