-
-
Notifications
You must be signed in to change notification settings - Fork 34.1k
GH-145110: fix arguments Clean and CleanAll for argument -t of batch.bat in case of PGO builds on Windows
#145111
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| Fix targets "Clean" and "CLeanAll" in case of PGO builds on Windows. Patch by | ||
| Chris Eibl. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -66,6 +66,7 @@ setlocal | |
| set platf=x64 | ||
| set conf=Release | ||
| set target=Build | ||
| set clean=false | ||
| set dir=%~dp0 | ||
| set parallel=/m | ||
| set verbose=/nologo /v:m /clp:summary | ||
|
|
@@ -119,6 +120,9 @@ if "%UseJIT%" NEQ "true" set IncludeLLVM=false | |
|
|
||
| if "%IncludeExternals%"=="true" call "%dir%get_externals.bat" | ||
|
|
||
| if /I "%target%"=="Clean" set clean=true | ||
| if /I "%target%"=="CleanAll" set clean=true | ||
|
|
||
| if "%do_pgo%" EQU "true" if "%platf%" EQU "x64" ( | ||
| if "%PROCESSOR_ARCHITEW6432%" NEQ "AMD64" if "%PROCESSOR_ARCHITECTURE%" NEQ "AMD64" ( | ||
| echo.ERROR: Cannot cross-compile with PGO | ||
|
|
@@ -159,15 +163,20 @@ if "%do_pgo%"=="true" ( | |
| rem %VARS% are evaluated eagerly, which would lose the ERRORLEVEL | ||
| rem value if we didn't split it out here. | ||
| if "%do_pgo%"=="true" if ERRORLEVEL 1 exit /B %ERRORLEVEL% | ||
|
|
||
| rem In case of a PGO build, we switch the conf here to PGUpdate | ||
| rem to get it cleaned or built as well. | ||
| if "%do_pgo%"=="true" ( | ||
| del /s "%dir%\*.pgc" | ||
| del /s "%dir%\..\Lib\*.pyc" | ||
| echo on | ||
| call "%dir%\..\python.bat" %pgo_job% | ||
| @echo off | ||
| call :Kill | ||
| set conf=PGUpdate | ||
| set target=Build | ||
| if "%clean%"=="false" ( | ||
| echo on | ||
| call "%dir%\..\python.bat" %pgo_job% | ||
| @echo off | ||
| call :Kill | ||
| set target=Build | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I do not really know why the target is switched here. For I'd happily remove it so that
Yet, I am unsure and might be overlooking something, so I haven't touched it (yet).
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 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.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 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 |
||
| ) | ||
| ) | ||
| goto :Build | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.