Skip to content

Commit b3f592a

Browse files
authored
Merge pull request #80610 from compnerd/summary
utils: print SCCache summary in summary view
2 parents f4ca0ab + c3d7c9d commit b3f592a

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

Diff for: utils/build.ps1

+10-2
Original file line numberDiff line numberDiff line change
@@ -476,6 +476,11 @@ function Add-TimingData {
476476
function Write-Summary {
477477
Write-Host "Summary:" -ForegroundColor Cyan
478478

479+
if ($EnableCaching) {
480+
Write-Host "SCCache:" -ForegroundColor Green
481+
& sccache.exe --show-stats
482+
}
483+
479484
$TotalTime = [TimeSpan]::Zero
480485
foreach ($Entry in $TimingData) {
481486
$TotalTime = $TotalTime.Add($Entry."Elapsed Time")
@@ -3197,8 +3202,11 @@ if ($Clean) {
31973202
}
31983203

31993204
if (-not $SkipBuild) {
3200-
if ($EnableCaching -And (-Not (Test-SCCacheAtLeast -Major 0 -Minor 7 -Patch 4))) {
3201-
throw "Minimum required sccache version is 0.7.4"
3205+
if ($EnableCaching) {
3206+
if (-Not (Test-SCCacheAtLeast -Major 0 -Minor 7 -Patch 4)) {
3207+
throw "Minimum required sccache version is 0.7.4"
3208+
}
3209+
& sccache.exe --zero-stats
32023210
}
32033211

32043212
Remove-Item -Force -Recurse ([IO.Path]::Combine((Get-InstallDir $HostPlatform), "Platforms")) -ErrorAction Ignore

0 commit comments

Comments
 (0)