Skip to content

Commit cf47a47

Browse files
committed
Accurately log arch + platform.
1 parent cf1deb2 commit cf47a47

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

utils/build.ps1

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -490,13 +490,26 @@ $WindowsSDKArchs = @($WindowsSDKs | ForEach-Object {
490490
# Build functions
491491
function Invoke-BuildStep([string] $Name) {
492492
if ($Summary) {
493+
# TODO: Replace hacky introspection of $Args with Platform object.
494+
$BuildStepPlatform = "Windows"
495+
$BuildStepArch = "(n/a)"
493496
$Stopwatch = [Diagnostics.Stopwatch]::StartNew()
497+
foreach ($Arg in $Args) {
498+
switch ($Arg.GetType().Name) {
499+
"Hashtable" {
500+
if ($Arg.ContainsKey("LLVMName")) { $BuildStepArch = $Arg["LLVMName"] }
501+
}
502+
"string" {
503+
if ($Arg -eq "Windows" -or $Arg -eq "Android") { $BuildStepPlatform = $Arg }
504+
}
505+
}
506+
}
494507
}
495508

496509
& $Name @Args
497510

498511
if ($Summary) {
499-
Add-TimingData $BuildArch.LLVMName "Windows" ($Name -replace "Build-","") $Stopwatch.Elapsed
512+
Add-TimingData $BuildStepArch $BuildStepPlatform ($Name -replace "Build-","") $Stopwatch.Elapsed
500513
}
501514
if ($Name.Replace("Build-", "") -eq $BuildTo) {
502515
exit 0

0 commit comments

Comments
 (0)