File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -62,6 +62,9 @@ If set, debug information will be generated for the builds.
6262. PARAMETER EnableCaching
6363If true, use `sccache` to cache the build rules.
6464
65+ . PARAMETER Clean
66+ If true, clean non-compiler builds while building.
67+
6568. PARAMETER Test
6669An array of names of projects to run tests for.
6770'*' runs all tests
@@ -101,6 +104,7 @@ param(
101104 [string []] $Test = @ (),
102105 [string ] $Stage = " " ,
103106 [string ] $BuildTo = " " ,
107+ [switch ] $Clean ,
104108 [switch ] $DebugInfo ,
105109 [switch ] $EnableCaching ,
106110 [switch ] $ToBatch
@@ -1161,7 +1165,6 @@ function Build-Runtime($Arch) {
11611165 SWIFT_NATIVE_SWIFT_TOOLS_PATH = " $BinaryCache \1\bin" ;
11621166 SWIFT_PATH_TO_LIBDISPATCH_SOURCE = " $SourceCache \swift-corelibs-libdispatch" ;
11631167 SWIFT_PATH_TO_STRING_PROCESSING_SOURCE = " $SourceCache \swift-experimental-string-processing" ;
1164- SWIFT_PATH_TO_SWIFT_SYNTAX_SOURCE = " $SourceCache \swift-syntax" ;
11651168 CMAKE_SHARED_LINKER_FLAGS = @ (" /INCREMENTAL:NO" , " /OPT:REF" , " /OPT:ICF" );
11661169 }
11671170 }
@@ -1743,6 +1746,13 @@ if (-not $SkipBuild) {
17431746 Invoke-BuildStep Build-Compilers $HostArch
17441747}
17451748
1749+ if ($Clean ) {
1750+ 2 .. 16 | % { Remove-Item - Force - Recurse " $BinaryCache \$_ " - ErrorAction Ignore }
1751+ foreach ($Arch in $SDKArchs ) {
1752+ 0 .. 3 | % { Remove-Item - Force - Recurse " $BinaryCache \$ ( $Arch.BuildiD + $_ ) " - ErrorAction Ignore }
1753+ }
1754+ }
1755+
17461756foreach ($Arch in $SDKArchs ) {
17471757 if (-not $SkipBuild ) {
17481758 Invoke-BuildStep Build-ZLib $Arch
You can’t perform that action at this time.
0 commit comments