GH-145110: fix arguments Clean and CleanAll for argument -t of batch.bat in case of PGO builds on Windows#145111
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
| call "%dir%\..\python.bat" %pgo_job% | ||
| @echo off | ||
| call :Kill | ||
| set target=Build |
There was a problem hiding this comment.
I do not really know why the target is switched here. For Clean and CleanAll this is definitely wrong. This only leaves Rebuild which is still converted to Build here like before.
I'd happily remove it so that Rebuild does what is asked for, and a quick test shows that it works.
Git blame reveals it was introduced in this commit linked to https://bugs.python.org/issue28573, which is dealing about PATH getting to long and
[...] also fixes two other issues with my build script - the PGOOPTS need to come before CERTOPTS, as they are parsed by different scripts, and the debug build command fell off somewhere which resulted in the debug builds not being rebuilt for 3.6.0b4 - they are still the 3.6.0b3 debug build.
Yet, I am unsure and might be overlooking something, so I haven't touched it (yet).
There was a problem hiding this comment.
Unless I'm misremembering how this works (I almost never rely on this batch file anymore - real releases don't use it at all), Rebuild here would cause recompiling post-profile, which isn't necessary. All the PGO happens during link, so we should save about half the build time by not rebuilding things that don't need rebuilding.
We would want Rebuild during PGInstrument, since that's the first stage. But from then, it's already re-built, and so subsequent stages shouldn't Rebuild.
There was a problem hiding this comment.
Ok, then let's keep it. Then I think this is fine to merge? I'll take care about the long path problem of the AMD64 Windows PGO NoGIL Tailcall PR builder with @itamaro in a discord discussion. I am close to 100% sure the regular builders will be green (like AMD64 Windows PGO NoGIL PR is for this PR as well).
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
Clean and CleanAll for argument -t of batch.bat in case of PGO builds on Windows
In case of
CleanorCleanAll, theBuildCleanandCleanAllfor argument-tofbatch.batdo not work correctly in case of PGO builds on Windows #145110