@@ -19,7 +19,7 @@ set TEMP=%~dp0..\..\tmp
1919mkdir  %TEMP%  2 >& 1 1 > nul 
2020echo  set PYTHON_HOME=%PYTHON_HOME% >  %TEMP% \call-build.cmd
2121echo  set SKIP_TESTS=%SKIP_TESTS% >>  %TEMP% \call-build.cmd
22- echo  set SKIP_PACKAGING= %SKIP_PACKAGING %>>  %TEMP% \call-build.cmd
22+ echo  set INCLUDE_PACKAGING= %INCLUDE_PACKAGING %>>  %TEMP% \call-build.cmd
2323echo  set SKIP_UPDATE_CHECKOUT=%SKIP_UPDATE_CHECKOUT% >>  %TEMP% \call-build.cmd
2424echo  set REPO_SCHEME=%REPO_SCHEME% >>  %TEMP% \call-build.cmd
2525echo  set WINDOWS_SDKS=%WINDOWS_SDKS% >>  %TEMP% \call-build.cmd
@@ -65,9 +65,9 @@ set TestArg=-Test lld,lldb,swift,dispatch,foundation,xctest,swift-format,sourcek
6565for  %%I  in  (%SKIP_TESTS% ) do  (call set  TestArg = %%T estArg:%%I ,=%% )
6666if  " %TestArg:~-1 % " == " ," %TestArg:~0 ,-1 % ) else  (set TestArg= )
6767
68- ::  Build the -SkipPackaging argument, if any 
69- set  SkipPackagingArg = -SkipPackaging
70- if  not  " %SKIP_PACKAGING % " == " 1 " set  " SkipPackagingArg =   " 
68+ ::  Build the packaging arguments (skipped for normal PRs and an added stage for toolchain PRs) 
69+ set  " PackagingArg = -SkipPackaging" 
70+ if  not  " %INCLUDE_PACKAGING % " == " " set  " PackagingArg = -Stage  %PackageRoot% " 
7171
7272::  Build the -WindowsSDKArchitectures argument, if any, otherwise build all the SDKs.
7373set  " WindowsSDKArchitecturesArg =  " 
@@ -85,10 +85,9 @@ powershell.exe -ExecutionPolicy RemoteSigned -File %~dp0build.ps1 ^
8585  -SourceCache %SourceRoot%  ^ 
8686  -BinaryCache %BuildRoot%  ^ 
8787  -ImageRoot %BuildRoot%  ^ 
88-   %SkipPackagingArg %  ^ 
88+   %PackagingArg %  ^ 
8989  %WindowsSDKArchitecturesArg%  ^ 
9090  %TestArg%  ^ 
91-   -SkipPackaging ^ 
9291  -IncludeSBoM ^ 
9392  -Summary ||  (exit /b 1)
9493
0 commit comments