Skip to content

Commit 4ea15a1

Browse files
committed
build: add a -Clean option to build.ps1
When the compiler changes, the SDK and tool builds do not notice the compiler change due to the missing compiler tracking. This allows us to quickly perform an incremental by not discarding the compiler build.
1 parent d0344e5 commit 4ea15a1

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

utils/build.ps1

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ param(
101101
[string[]] $Test = @(),
102102
[string] $Stage = "",
103103
[string] $BuildTo = "",
104+
[switch] $Clean,
104105
[switch] $DebugInfo,
105106
[switch] $EnableCaching,
106107
[switch] $ToBatch
@@ -1743,6 +1744,13 @@ if (-not $SkipBuild) {
17431744
Invoke-BuildStep Build-Compilers $HostArch
17441745
}
17451746

1747+
if ($Clean) {
1748+
2..16 | % { Remove-Item -Force -Recurse "$BinaryCache\$_" -ErrorAction Ignore }
1749+
foreach ($Arch in $SDKArchs) {
1750+
0..3 | % { Remove-Item -Force -Recurse "$BinaryCache\$($Arch.BuildiD + $_)" -ErrorAction Ignore }
1751+
}
1752+
}
1753+
17461754
foreach ($Arch in $SDKArchs) {
17471755
if (-not $SkipBuild) {
17481756
Invoke-BuildStep Build-ZLib $Arch

0 commit comments

Comments
 (0)