bpo-45582: Fix test_embed failure during a PGO build on Windows (GH-30014)

This defines VPATH differently in PGO instrumentation builds, to account for a different default output directory. It also adds sys._vpath on Windows to make the value available to sysconfig so that it can be used in tests.
This commit is contained in:
neonene 2021-12-11 02:13:55 +09:00 committed by GitHub
parent 036bbb1d1b
commit 3f398a77d3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 23 additions and 7 deletions

View file

@ -226,7 +226,9 @@
<ClCompile Include="..\Python\structmember.c" />
<ClCompile Include="..\Python\suggestions.c" />
<ClCompile Include="..\Python\symtable.c" />
<ClCompile Include="..\Python\sysmodule.c" />
<ClCompile Include="..\Python\sysmodule.c">
<PreprocessorDefinitions>VPATH="$(PyVPath)";%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<ClCompile Include="..\Python\thread.c" />
<ClCompile Include="..\Python\traceback.c" />
</ItemGroup>

View file

@ -53,6 +53,10 @@
<BuildPath Condition="!HasTrailingSlash($(BuildPath))">$(BuildPath)\</BuildPath>
<BuildPath Condition="$(Configuration) == 'PGInstrument'">$(BuildPath)instrumented\</BuildPath>
<!-- VPATH definition (escaped) -->
<PyVPath Condition="$(Configuration) != 'PGInstrument'">..\\..</PyVPath>
<PyVPath Condition="$(Configuration) == 'PGInstrument'">..\\..\\..</PyVPath>
<!-- Directories of external projects. tcltk is handled in tcltk.props -->
<ExternalsDir>$(EXTERNALS_DIR)</ExternalsDir>
<ExternalsDir Condition="$(ExternalsDir) == ''">$([System.IO.Path]::GetFullPath(`$(PySourcePath)externals`))</ExternalsDir>

View file

@ -115,7 +115,7 @@
PREFIX=NULL;
EXEC_PREFIX=NULL;
VERSION=NULL;
VPATH="..\\..";
VPATH="$(PyVPath)";
PYDEBUGEXT="$(PyDebugExt)";
PLATLIBDIR="DLLs";
%(PreprocessorDefinitions)
@ -519,7 +519,9 @@
<ClCompile Include="..\Python\suggestions.c" />
<ClCompile Include="..\Python\structmember.c" />
<ClCompile Include="..\Python\symtable.c" />
<ClCompile Include="..\Python\sysmodule.c" />
<ClCompile Include="..\Python\sysmodule.c">
<PreprocessorDefinitions>VPATH="$(PyVPath)";%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<ClCompile Include="..\Python\thread.c" />
<ClCompile Include="..\Python\traceback.c" />
</ItemGroup>