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.
62
62
. PARAMETER EnableCaching
63
63
If true, use `sccache` to cache the build rules.
64
64
65
+ . PARAMETER Clean
66
+ If true, clean non-compiler builds while building.
67
+
65
68
. PARAMETER Test
66
69
An array of names of projects to run tests for.
67
70
'*' runs all tests
@@ -101,6 +104,7 @@ param(
101
104
[string []] $Test = @ (),
102
105
[string ] $Stage = " " ,
103
106
[string ] $BuildTo = " " ,
107
+ [switch ] $Clean ,
104
108
[switch ] $DebugInfo ,
105
109
[switch ] $EnableCaching ,
106
110
[switch ] $ToBatch
@@ -1161,7 +1165,6 @@ function Build-Runtime($Arch) {
1161
1165
SWIFT_NATIVE_SWIFT_TOOLS_PATH = " $BinaryCache \1\bin" ;
1162
1166
SWIFT_PATH_TO_LIBDISPATCH_SOURCE = " $SourceCache \swift-corelibs-libdispatch" ;
1163
1167
SWIFT_PATH_TO_STRING_PROCESSING_SOURCE = " $SourceCache \swift-experimental-string-processing" ;
1164
- SWIFT_PATH_TO_SWIFT_SYNTAX_SOURCE = " $SourceCache \swift-syntax" ;
1165
1168
CMAKE_SHARED_LINKER_FLAGS = @ (" /INCREMENTAL:NO" , " /OPT:REF" , " /OPT:ICF" );
1166
1169
}
1167
1170
}
@@ -1743,6 +1746,13 @@ if (-not $SkipBuild) {
1743
1746
Invoke-BuildStep Build-Compilers $HostArch
1744
1747
}
1745
1748
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
+
1746
1756
foreach ($Arch in $SDKArchs ) {
1747
1757
if (-not $SkipBuild ) {
1748
1758
Invoke-BuildStep Build-ZLib $Arch
You can’t perform that action at this time.
0 commit comments