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

bpo-45582: Change the folder location of PGO-instrumented builds on Windows #29941

Closed
wants to merge 6 commits into from
Closed
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
When PGO building on Windows, the folder for the instrumented binaries is
now located at the same level as that for the production builds.
(e.g. ``PCbuild/amd64/instrumented`` to ``PCbuild/amd64_instrumented``)
We need to follow ``VPATH``, which is used in new ``getpath.py`` and defined as
``"..\\.."`` in ``pythoncore.vcxproj``, to calculate the correct prefix folder.
4 changes: 2 additions & 2 deletions PCbuild/pyproject.props
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,8 @@ public override bool Execute() {

<Target Name="CopyPGCFiles" BeforeTargets="PrepareForBuild" Condition="$(Configuration) == 'PGUpdate'">
<ItemGroup>
<_PGCFiles Include="$(OutDir)instrumented\$(TargetName)!*.pgc" />
<_PGDFile Include="$(OutDir)instrumented\$(TargetName).pgd" />
<_PGCFiles Include="$(OutDir.TrimEnd('\'))_instrumented\$(TargetName)!*.pgc" />
<_PGDFile Include="$(OutDir.TrimEnd('\'))_instrumented\$(TargetName).pgd" />
<_CopyFiles Include="@(_PGCFiles);@(_PGDFile)" Condition="Exists(%(FullPath))" />
</ItemGroup>
<Delete Files="@(_CopyFiles->'$(OutDir)%(Filename)%(Extension)')" />
Expand Down
2 changes: 1 addition & 1 deletion PCbuild/python.props
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
<BuildPath Condition="'$(ArchName)' == 'arm64'">$(BuildPathArm64)</BuildPath>
<BuildPath Condition="'$(BuildPath)' == ''">$(PySourcePath)PCbuild\$(ArchName)\</BuildPath>
<BuildPath Condition="!HasTrailingSlash($(BuildPath))">$(BuildPath)\</BuildPath>
<BuildPath Condition="$(Configuration) == 'PGInstrument'">$(BuildPath)instrumented\</BuildPath>
<BuildPath Condition="$(Configuration) == 'PGInstrument'">$(BuildPath.TrimEnd('\'))_instrumented\</BuildPath>

<!-- Directories of external projects. tcltk is handled in tcltk.props -->
<ExternalsDir>$(EXTERNALS_DIR)</ExternalsDir>
Expand Down