Skip to content

Commit 3edec5d

Browse files
authored
bpo-44479: Do not regenerate files during a PGO build as it will invalidate the profile. (GH-27460)
1 parent 2116909 commit 3edec5d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

PCbuild/regen.targets

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,9 @@
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

@@ -119,5 +121,7 @@
119121
<Message Text="Wrote $(OutDir)LICENSE.txt" Importance="high" />
120122
</Target>
121123

122-
<Target Name="PostBuildRegen" DependsOnTargets="_RegenTestFrozenmain;_RegenLicense" />
124+
<Target Name="PostBuildRegen"
125+
Condition="$(Configuration) != 'PGInstrument' and $(Configuration) != 'PGUpdate'"
126+
DependsOnTargets="_RegenTestFrozenmain;_RegenLicense" />
123127
</Project>

0 commit comments

Comments
 (0)