]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-44479: Do not regenerate files during a PGO build as it will invalidate the profi...
authorSteve Dower <steve.dower@python.org>
Thu, 29 Jul 2021 22:18:17 +0000 (23:18 +0100)
committerGitHub <noreply@github.com>
Thu, 29 Jul 2021 22:18:17 +0000 (23:18 +0100)
Also remove some unused code that should not have been backported.

PCbuild/regen.targets

index a1de340ab544c3fe56b95d33bc8f75e26465f062..ff56d1148e845e16aad187ad776c773defdbaeff 100644 (file)
           WorkingDirectory="$(PySourcePath)" />
   </Target>
 
-  <Target Name="Regen" DependsOnTargets="_TouchRegenSources;_RegenPegen;_RegenAST_H;_RegenOpcodes;_RegenTokens;_RegenKeywords">
+  <Target Name="Regen"
+          Condition="$(Configuration) != 'PGUpdate'"
+          DependsOnTargets="_TouchRegenSources;_RegenPegen;_RegenAST_H;_RegenOpcodes;_RegenTokens;_RegenKeywords">
     <Message Text="Generated sources are up to date" Importance="high" />
   </Target>
 
 
   <ItemGroup>
-    <_TestFrozenSources Include="$(PySourcePath)Programs\freeze_test_frozenmain.py;
-                                 $(PySourcePath)Programs\test_frozenmain.py;
-                                 @(_OpcodeOutputs)" />
-    <_TestFrozenOutputs Include="$(PySourcePath)Programs\test_frozenmain.h" />
     <_LicenseSources Include="$(PySourcePath)LICENSE;
                               $(PySourcePath)PC\crtlicense.txt;
                               $(bz2Dir)LICENSE;
     <Message Text="Wrote $(OutDir)LICENSE.txt" Importance="high" />
   </Target>
 
-  <Target Name="PostBuildRegen" DependsOnTargets="_RegenLicense" />
+  <Target Name="PostBuildRegen"
+          Condition="$(Configuration) != 'PGInstrument' and $(Configuration) != 'PGUpdate'"
+          DependsOnTargets="_RegenLicense" />
 </Project>