Skip to content

Commit 0b984d1

Browse files
authored
bpo-44479: Do not regenerate files during a PGO build as it will invalidate the profile. (GH-27462)
Also remove some unused code that should not have been backported.
1 parent 9d7511c commit 0b984d1

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

PCbuild/regen.targets

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,16 +78,14 @@
7878
WorkingDirectory="$(PySourcePath)" />
7979
</Target>
8080

81-
<Target Name="Regen" DependsOnTargets="_TouchRegenSources;_RegenPegen;_RegenAST_H;_RegenOpcodes;_RegenTokens;_RegenKeywords">
81+
<Target Name="Regen"
82+
Condition="$(Configuration) != 'PGUpdate'"
83+
DependsOnTargets="_TouchRegenSources;_RegenPegen;_RegenAST_H;_RegenOpcodes;_RegenTokens;_RegenKeywords">
8284
<Message Text="Generated sources are up to date" Importance="high" />
8385
</Target>
8486

8587

8688
<ItemGroup>
87-
<_TestFrozenSources Include="$(PySourcePath)Programs\freeze_test_frozenmain.py;
88-
$(PySourcePath)Programs\test_frozenmain.py;
89-
@(_OpcodeOutputs)" />
90-
<_TestFrozenOutputs Include="$(PySourcePath)Programs\test_frozenmain.h" />
9189
<_LicenseSources Include="$(PySourcePath)LICENSE;
9290
$(PySourcePath)PC\crtlicense.txt;
9391
$(bz2Dir)LICENSE;
@@ -112,5 +110,7 @@
112110
<Message Text="Wrote $(OutDir)LICENSE.txt" Importance="high" />
113111
</Target>
114112

115-
<Target Name="PostBuildRegen" DependsOnTargets="_RegenLicense" />
113+
<Target Name="PostBuildRegen"
114+
Condition="$(Configuration) != 'PGInstrument' and $(Configuration) != 'PGUpdate'"
115+
DependsOnTargets="_RegenLicense" />
116116
</Project>

0 commit comments

Comments
 (0)