@@ -2784,6 +2784,19 @@ try {
27842784
27852785Fetch- Dependencies
27862786
2787+ if ($Clean ) {
2788+ 10 ..[HostComponent ].getEnumValues()[-1 ] | ForEach-Object { Remove-Item - Force - Recurse " $BinaryCache \$_ " - ErrorAction Ignore }
2789+ # In case of a previous test run, clear out the swiftmodules as they are not a stable format.
2790+ Remove-Item - Force - Recurse - Path " $ ( $HostARch.ToolchainInstallRoot ) \usr\lib\swift\windows\*.swiftmodule" - ErrorAction Ignore
2791+ foreach ($Arch in $WindowsSDKArchs ) {
2792+ 0 ..[TargetComponent ].getEnumValues()[-1 ] | ForEach-Object { Remove-Item - Force - Recurse " $BinaryCache \$ ( $Arch.BuildID + $_ ) " - ErrorAction Ignore }
2793+ }
2794+ foreach ($Arch in $AndroidSDKArchs ) {
2795+ 0 ..[TargetComponent ].getEnumValues()[-1 ] | ForEach-Object { Remove-Item - Force - Recurse " $BinaryCache \$ ( $Arch.BuildID + $_ ) " - ErrorAction Ignore }
2796+ }
2797+ }
2798+
2799+
27872800if (-not $SkipBuild ) {
27882801 if ($EnableCaching -And (-Not (Test-SCCacheAtLeast - Major 0 - Minor 7 - Patch 4 ))) {
27892802 throw " Minimum required sccache version is 0.7.4"
@@ -2804,18 +2817,6 @@ if (-not $SkipBuild) {
28042817 Invoke-BuildStep Build-Compilers $HostArch
28052818}
28062819
2807- if ($Clean ) {
2808- 10 ..[HostComponent ].getEnumValues()[-1 ] | ForEach-Object { Remove-Item - Force - Recurse " $BinaryCache \$_ " - ErrorAction Ignore }
2809- # In case of a previous test run, clear out the swiftmodules as they are not a stable format.
2810- Remove-Item - Force - Recurse " $ ( $HostARch.ToolchainInstallRoot ) \usr\lib\swift\windows" - ErrorAction Ignore
2811- foreach ($Arch in $WindowsSDKArchs ) {
2812- 0 ..[TargetComponent ].getEnumValues()[-1 ] | ForEach-Object { Remove-Item - Force - Recurse " $BinaryCache \$ ( $Arch.BuildID + $_ ) " - ErrorAction Ignore }
2813- }
2814- foreach ($Arch in $AndroidSDKArchs ) {
2815- 0 ..[TargetComponent ].getEnumValues()[-1 ] | ForEach-Object { Remove-Item - Force - Recurse " $BinaryCache \$ ( $Arch.BuildID + $_ ) " - ErrorAction Ignore }
2816- }
2817- }
2818-
28192820if (-not $SkipBuild ) {
28202821 foreach ($Arch in $WindowsSDKArchs ) {
28212822 Invoke-BuildStep Build-ZLib Windows $Arch
0 commit comments