Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[python3] Fix building x86-windows-static triplet on VS 2017. #12412

Merged
merged 1 commit into from
Jul 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 20 additions & 3 deletions ports/python3/0001-static-library.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/PC/pyconfig.h b/PC/pyconfig.h
index b6b8d44586..35b329f307 100644
index b6b8d445869bc..35b329f307c12 100644
--- a/PC/pyconfig.h
+++ b/PC/pyconfig.h
@@ -257,6 +257,7 @@ typedef int pid_t;
Expand All @@ -23,7 +23,7 @@ index b6b8d44586..35b329f307 100644

#if defined(MS_WIN64)
diff --git a/PCbuild/pythoncore.vcxproj b/PCbuild/pythoncore.vcxproj
index 0666b90f66..eb5ecffe71 100644
index 0666b90f66cc9..ca83b82d8a0fe 100644
--- a/PCbuild/pythoncore.vcxproj
+++ b/PCbuild/pythoncore.vcxproj
@@ -73,7 +73,7 @@
Expand All @@ -35,7 +35,7 @@ index 0666b90f66..eb5ecffe71 100644
<UseOfMfc>false</UseOfMfc>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
@@ -102,7 +102,7 @@
@@ -102,12 +102,24 @@
<AdditionalOptions>/Zm200 %(AdditionalOptions)</AdditionalOptions>
<AdditionalIncludeDirectories>$(PySourcePath)Python;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories Condition="$(IncludeExternals)">$(zlibDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
Expand All @@ -44,3 +44,20 @@ index 0666b90f66..eb5ecffe71 100644
<PreprocessorDefinitions Condition="$(IncludeExternals)">_Py_HAVE_ZLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<AdditionalDependencies>version.lib;shlwapi.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
+ <Lib>
+ <TargetMachine Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">MachineX86</TargetMachine>
+ </Lib>
+ <Lib>
+ <TargetMachine Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">MachineX86</TargetMachine>
+ </Lib>
+ <Lib>
+ <TargetMachine Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">MachineX86</TargetMachine>
+ </Lib>
+ <Lib>
+ <TargetMachine Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MachineX86</TargetMachine>
+ </Lib>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="..\Include\abstract.h" />
2 changes: 1 addition & 1 deletion ports/python3/0002-static-crt.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/PCbuild/pythoncore.vcxproj b/PCbuild/pythoncore.vcxproj
index eb5ecffe71..2a7c819533 100644
index ca83b82d8a0fe..b925a26a96e5e 100644
--- a/PCbuild/pythoncore.vcxproj
+++ b/PCbuild/pythoncore.vcxproj
@@ -104,6 +104,10 @@
Expand Down
1 change: 1 addition & 0 deletions ports/python3/CONTROL
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Source: python3
Version: 3.8.3
Port-Version: 1
Homepage: https://github.com/python/cpython
Description: The Python programming language as an embeddable library
Build-Depends: libffi, openssl, zlib (!uwp&!windows)
Expand Down