Skip to content

[Windows] Stop pinning a Windows SDK version by default - #4588

Merged
mattleibow merged 1 commit into
mainfrom
mattleibow-fix-benchmark-source-msvc-init
Jul 30, 2026
Merged

mattleibow merged 1 commit into
mainfrom
mattleibow-fix-benchmark-source-msvc-init

Conversation

@mattleibow

@mattleibow mattleibow commented Jul 30, 2026 •

Copy link
Copy Markdown
Contributor

Description

The benchmark-source (windows-latest, Windows, native/windows) leg of Track - Benchmarks dies the instant it starts the native build (failing run):

Done. Made 114 targets from 63 files in 358ms
Initializing the Visual C++ environment once for amd64.
An error occurred when executing task 'libSkiaSharp'.
Error: Process 'cmd.exe' failed with error: 1

Root cause. RunNinjaWithVcVars (added in #4570) runs:

call "<VS>/VC/Auxiliary/Build/vcvarsall.bat" amd64 10.0.22621.0 -vcvars_ver=14.2 >nul && <ninja>

10.0.22621.0 was the default of the --windowsSdkVersion argument, also new in #4570, and it matches what the AzDO agents ship. The GitHub-hosted runner is windows-2025-vs2026, which ships only Windows SDK 10.0.26100.0. vcvarsall hard-fails on an SDK version that isn't installed and returns 1 — and >nul swallowed the reason, which is why the log says nothing at all.

Reproduced locally (VS 18, SDKs 22621 + 26100 installed) with the exact generated command line:

SDK argument exit output with >nul
10.0.22621.0 (installed) 0 —
10.0.20348.0 (not installed) 1 (nothing)

Dropping >nul reveals it: [ERROR:winsdk.bat] Windows SDK 10.0.20348.0 : '…\include\10.0.20348.0\um' not found or was incomplete.

Nothing needed that default. Before #4570 there was no such argument: gn resolved win_sdk_version itself (BUILDCONFIG.gn → lowest_version_dir.py) and the toolchain interpolated that same resolved value into the vcvarsall command it generated — so the version was always one that exists on the machine, and the two could never disagree. The same runner image built libSkiaSharp from source successfully an hour before the failure (run 30492110303, job 90712480452 — 33 min of ninja, green). Hardcoding a version just meant the build broke on any machine that didn't happen to have that exact SDK — CI here, and equally a developer box with only a newer one.

The fix: default the argument to empty and omit it from both gn and vcvarsall when unset, so each detects an SDK that actually exists. Setting it still pins both — so --windowsSdkVersion 10.0.26100.0 remains available to build against a specific SDK locally, and gn and vcvarsall stay in agreement when you do. Dropping >nul restores visibility. It was hiding the vcvarsall banner, but >nul redirects only stdout — and VsDevCmd writes its errors there too, so it discarded the diagnosis along with the banner (verified: with 2>nul the [ERROR:winsdk.bat] lines still appear, with >nul nothing does). The banner is five lines per architecture and is worth having in the log; the next failure in here will say why instead of just surfacing an exit code.

Why it wasn't caught. benchmark-source is if: github.event_name == 'pull_request' — it is skipped on main (verified on run 30503500442). #4570 merged green without this path ever being exercised, and the failure surfaced on an unrelated PR (#4575, which touches no native files). Worth considering separately whether the native source-build legs should also run on main.

Alternatives considered
  • Override the SDK only in track-benchmarks.yml. Fixes CI but leaves the same landmine for every other consumer, including local builds on a machine without 10.0.22621.0.
  • Detect the SDK in cake via skia's find_winsdk.py + lowest_version_dir.py and pass that one value to both. Works, but it reimplements in cake what gn already does for itself, for no gain over simply not passing a version.
  • Install the missing SDK on the runner. install-winsdk.ps1 exists, but it needs a per-SDK fwlink LinkId and adds minutes to every run for an SDK the job has no reason to care about.
  • Drop the vcvarsall call entirely. Every tool in gn/toolchain/BUILD.gn is invoked by absolute path and every search path is an explicit flag (-imsvc, /LIBPATH:), so it may well be redundant for our LLVM-based config — but proving that needs a real Windows build and is a different change with a different blast radius. Filed as [Windows] Investigate whether the native build still needs the vcvarsall call at all #4589.

Related issues

Regression from #4570 ("[Windows] Initialize the MSVC environment once per native build"). #4589 follows up on whether the vcvarsall call is needed at all.

Fixes #

Required skia PR

None.

Areas affected

  • Managed API (binding/)
  • Native / C API (externals/skia/src/c, include/c)
  • Generated P/Invoke bindings
  • Native dependency or Skia update (libpng, HarfBuzz, FreeType, zlib, milestone bump, …)
  • Views & integrations (MAUI, Uno, WPF, WinUI, Blazor, …)
  • Rendering output / visual behavior
  • Performance
  • Tests
  • Build, packaging, or CI
  • Documentation or samples

Changes

None — build-infrastructure only, no public API or managed behavior change.

One build-side behaviour change worth naming: --windowsSdkVersion no longer defaults to 10.0.22621.0. Unset, gn detects the SDK as it did before #4570; set, it pins gn and vcvarsall exactly as before. On the AzDO agents gn's detection returns 10.0.22621.0 — the same version that was hardcoded — so the compiler flags are expected to be identical; the CI run on this PR is what confirms it.

Testing

No unit tests — cake/CI build plumbing with no managed surface. Verified empirically instead:

  • Reproduced the failure locally with the exact command shape the helper generates, against VS 18 with SDKs 22621 + 26100: installed SDK → exit 0; missing SDK → exit 1 with zero output, matching CI byte for byte. Removing >nul surfaced [ERROR:winsdk.bat] Windows SDK … not found or was incomplete.
  • Confirmed why >nul hid the error: rerunning the failing command with 2>nul (discarding stderr) still printed [ERROR:winsdk.bat] Windows SDK … not found or was incomplete, proving VsDevCmd writes errors to stdout; with >nul the same command captured zero lines and exit 1 — exactly the CI symptom.
  • Verified both generated command shapes — with the SDK argument omitted and with it present (amd64 10.0.26100.0 -vcvars_ver=14.2): both initialize for x64 and exit 0, and the chained ninja command runs. Also checked the ProcessArgumentBuilder rendering through System.Diagnostics.Process so the nested quotes survive cmd /s.
  • Confirmed against live CI: on this branch the Windows leg reached ~18 minutes of ninja compilation, versus dying in ~40 seconds before the fix.
  • Confirmed gn still detects when win_sdk_version is unset: BUILDCONFIG.gn declares it empty and calls lowest_version_dir.py. Ran that script against a real Windows Kits\10\Include — returns 10.0.22621.0 with 22621 + 26100 installed, i.e. the value that was previously hardcoded.
  • Checked what actually consumes the SDK version in gn/skia/BUILD.gn: includes are emitted as -imsvc flags (or gn include_dirs) and libs as lib_dirs → /LIBPATH:, all interpolated from gn's $win_sdk_version.
  • Cake script compilation validated with --dryrun, both with no argument and with --windowsSdkVersion=10.0.26100.0, confirming the override still plumbs through.

Not tested locally: a full libSkiaSharp compile (no depot_tools/skia checkout on this machine) and the macOS/Linux legs (untouched). The two things CI must confirm are the benchmark-source (windows-latest, …) job — which only runs on pull requests, so this PR is the test — and the AzDO Windows native job proving gn's detection resolves to the SDK that was previously hardcoded.

Checklist

  • Tests added or updated (if omitted, explain why above) — n/a, CI/build script change; verified empirically as described above
  • Changes above lists all public API and behavioral changes (or "None.")
  • New/changed public API? Filed a docs issue in mono/SkiaSharp-API-docs so reference docs can be written later — n/a, no public API change
  • Native change? Companion mono/skia PR linked above and bindings regenerated — n/a, no C API or submodule change

@github-actions

Copy link
Copy Markdown
Contributor

📦 Try the packages from this PR

Warning

Do not run these scripts without first reviewing the code in this PR.

Step 1 — Download the packages

bash / macOS / Linux:

curl -fsSL https://raw.githubusercontent.com/mono/SkiaSharp/main/scripts/get-skiasharp-pr.sh | bash -s -- 4588

PowerShell / Windows:

iex "& { $(irm https://raw.githubusercontent.com/mono/SkiaSharp/main/scripts/get-skiasharp-pr.ps1) } 4588"

Step 2 — Add the local NuGet source

dotnet nuget add source ~/.skiasharp/hives/pr-4588/packages --name skiasharp-pr-4588
More options
Option Description
--successful-only / -SuccessfulOnly Only use successful builds
--force / -Force Overwrite previously downloaded packages
--list / -List List available artifacts without downloading
--build-id ID / -BuildId ID Download from a specific build

Or download manually from Azure Pipelines — look for the nuget artifact on the build for this PR.

Remove the source when you're done:

dotnet nuget remove source skiasharp-pr-4588

@mattleibow
mattleibow force-pushed the mattleibow-fix-benchmark-source-msvc-init branch from 3f0f32a to eec0894 Compare July 30, 2026 01:56
@mattleibow mattleibow changed the title [CI] Only pin the Windows SDK for vcvarsall when it is installed [CI] Ask the benchmark runner for the Windows SDK it actually has Jul 30, 2026
@github-actions

github-actions Bot commented Jul 30, 2026 •

Copy link
Copy Markdown
Contributor

📊 SkiaSharp benchmarks — PR #4588

⭐ this PR (full source build) vs 🌙 nightly · Linux · Windows · macOS

Informational only — this never blocks the PR. 🟢 faster / less allocation · 🔴 slower / more allocation; moves under 5% are hidden as noise.

⏱️ Times are raw BenchmarkDotNet means, and the ⭐ PR and baseline legs run on separate CI runners, so microbenchmarks can swing run-to-run — treat small time deltas as noise. Allocations are deterministic and the reliable signal. The interactive perf-dashboard (linked below) applies smoothing for the trend view.

Highlights

⏱️ Time — 🔴 54 slower · 🟢 18 faster

  • 🔴 RasterImageLifecycleBenchmark.CreateDataWithReleaseProc(Count: 256) · Windows · 98.39 µs → 131.30 µs (+33%)
  • 🔴 PathBoundsBenchmark.TightBounds(Points: 1024) · Windows · 16.11 µs → 21.20 µs (+32%)
  • 🔴 PathBoundsBenchmark.TightBounds(Points: 64) · Windows · 1.55 µs → 1.96 µs (+27%)
  • 🔴 RasterImageLifecycleBenchmark.CreateRasterImage(Count: 256) · Windows · 252.48 µs → 315.26 µs (+25%)
  • 🔴 MatrixMapPointsBenchmark.MapRadius(Points: 4096) · Windows · 144.64 µs → 180.33 µs (+25%)
  • …and 67 more (see details below)
Full per-OS benchmark deltas

Linux

⏱️ Time (vs 🌙 nightly 4.151.0-nightly.109)

Benchmark baseline this PR Δ
ColorMathBenchmark.ToColor(Colors: 4096) 15.00 µs 11.65 µs 🟢 -22%
MatrixOpsBenchmark.Concat(Count: 4096) 216.48 µs 254.59 µs 🔴 +18%
RasterImageLifecycleBenchmark.CreateDataWithReleaseProc(Count: 256) 97.12 µs 111.97 µs 🔴 +15%
MatrixMapPointsBenchmark.MapPoint(Points: 4096) 72.04 µs 82.17 µs 🔴 +14%
MatrixMapPointsBenchmark.MapRect(Points: 256) 11.25 µs 12.78 µs 🔴 +14%
MatrixMapPointsBenchmark.MapRadius(Points: 256) 13.60 µs 15.39 µs 🔴 +13%
ColorMathBenchmark.PreMultiply(Colors: 4096) 12.87 µs 14.49 µs 🔴 +13%
MatrixMapPointsBenchmark.MapRect(Points: 4096) 180.02 µs 202.53 µs 🔴 +13%
MatrixOpsBenchmark.Invert(Count: 4096) 133.31 µs 149.96 µs 🔴 +12%
MatrixMapPointsBenchmark.MapPoint(Points: 256) 4.62 µs 5.08 µs 🔴 +10%
ColorMathBenchmark.UnPreMultiply(Colors: 4096) 11.43 µs 12.57 µs 🔴 +10%
MatrixMapPointsBenchmark.MapVector(Points: 256) 10.85 µs 11.80 µs 🔴 +9%
MatrixMapPointsBenchmark.MapVector(Points: 4096) 174.72 µs 189.59 µs 🔴 +9%
MatrixMapPointsBenchmark.MapRadius(Points: 4096) 228.36 µs 246.33 µs 🔴 +8%
LargeImageScaleBenchmark.UpscaleOpaque(Size: 2048) 2.65 ms 2.86 ms 🔴 +8%
LargeImageScaleBenchmark.UpscaleOpaque(Size: 1024) 686.83 µs 736.29 µs 🔴 +7%
RuntimeEffectShaderBenchmark.DrawFrame 2.82 ms 3.02 ms 🔴 +7%
ColorMathBenchmark.ToColorF(Colors: 4096) 13.12 µs 14.05 µs 🔴 +7%
BitmapDrawBenchmark.DrawScaledTiles(Tiles: 256) 1.33 ms 1.41 ms 🔴 +6%
BitmapDrawBenchmark.DrawUnscaledTiles(Tiles: 64) 251.96 µs 266.59 µs 🔴 +6%
RasterImageLifecycleBenchmark.CreateRasterImage(Count: 256) 270.09 µs 254.43 µs 🟢 -6%
MatrixMapPointsBenchmark.MapPoints(Points: 256) 233.5 ns 220.4 ns 🟢 -6%
BitmapDrawBenchmark.DrawScaledTiles(Tiles: 64) 356.40 µs 376.22 µs 🔴 +6%
LargeImageScaleBenchmark.UpscaleCrossfade(Size: 2048) 7.65 ms 8.05 ms 🔴 +5%

Windows

⏱️ Time (vs 🌙 nightly 4.151.0-nightly.109)

Benchmark baseline this PR Δ
RasterImageLifecycleBenchmark.CreateDataWithReleaseProc(Count: 256) 98.39 µs 131.30 µs 🔴 +33%
PathBoundsBenchmark.TightBounds(Points: 1024) 16.11 µs 21.20 µs 🔴 +32%
PathBoundsBenchmark.TightBounds(Points: 64) 1.55 µs 1.96 µs 🔴 +27%
RasterImageLifecycleBenchmark.CreateRasterImage(Count: 256) 252.48 µs 315.26 µs 🔴 +25%
MatrixMapPointsBenchmark.MapRadius(Points: 4096) 144.64 µs 180.33 µs 🔴 +25%
MatrixMapPointsBenchmark.MapVector(Points: 4096) 121.64 µs 148.64 µs 🔴 +22%
MatrixOpsBenchmark.Concat(Count: 4096) 229.54 µs 276.61 µs 🔴 +21%
MatrixMapPointsBenchmark.MapRadius(Points: 256) 9.00 µs 10.84 µs 🔴 +20%
MatrixMapPointsBenchmark.MapRect(Points: 4096) 118.30 µs 141.90 µs 🔴 +20%
MatrixMapPointsBenchmark.MapRect(Points: 256) 7.52 µs 8.94 µs 🔴 +19%
MatrixOpsBenchmark.Invert(Count: 4096) 130.82 µs 155.40 µs 🔴 +19%
MatrixMapPointsBenchmark.MapPoint(Points: 4096) 76.38 µs 88.81 µs 🔴 +16%
MatrixMapPointsBenchmark.MapVector(Points: 256) 8.07 µs 9.39 µs 🔴 +16%
MatrixMapPointsBenchmark.MapPoints(Points: 4096) 2.47 µs 2.08 µs 🟢 -16%
MatrixMapPointsBenchmark.MapPoint(Points: 256) 4.80 µs 5.52 µs 🔴 +15%
ColorParseBenchmark.Parse(Iterations: 1000) 76.49 µs 87.67 µs 🔴 +15%
BitmapDrawBenchmark.DrawScaledTiles(Tiles: 64) 333.19 µs 377.62 µs 🔴 +13%
ColorMathBenchmark.ToColor(Colors: 4096) 14.35 µs 16.25 µs 🔴 +13%
BitmapDrawBenchmark.DrawScaledTiles(Tiles: 256) 1.25 ms 1.41 ms 🔴 +13%
BitmapDrawBenchmark.DrawUnscaledTiles(Tiles: 64) 244.21 µs 273.52 µs 🔴 +12%
ColorMathBenchmark.PreMultiply(Colors: 4096) 13.21 µs 14.79 µs 🔴 +12%
LargeImageScaleBenchmark.UpscaleOpaque(Size: 1024) 739.16 µs 826.94 µs 🔴 +12%
LargeImageScaleBenchmark.UpscaleCrossfade(Size: 2048) 10.28 ms 11.45 ms 🔴 +11%
RuntimeEffectShaderBenchmark.DrawFrame 1.14 ms 1.26 ms 🔴 +11%
CanvasDrawBenchmark.Draw(Shapes: 512) 21.03 ms 23.16 ms 🔴 +10%
…and 7 more

macOS

⏱️ Time (vs 🌙 nightly 4.151.0-nightly.109)

Benchmark baseline this PR Δ
ColorMathBenchmark.UnPreMultiply(Colors: 4096) 9.12 µs 7.42 µs 🟢 -19%
PathBoundsBenchmark.TightBounds(Points: 64) 1.05 µs 867.2 ns 🟢 -18%
MatrixOpsBenchmark.Concat(Count: 4096) 134.09 µs 111.04 µs 🟢 -17%
MatrixOpsBenchmark.Invert(Count: 4096) 78.35 µs 65.21 µs 🟢 -17%
PathBoundsBenchmark.TightBounds(Points: 1024) 8.66 µs 10.03 µs 🔴 +16%
LargeImageScaleBenchmark.UpscaleOpaque(Size: 2048) 3.08 ms 2.64 ms 🟢 -14%
ColorMathBenchmark.PreMultiply(Colors: 4096) 9.51 µs 8.25 µs 🟢 -13%
CanvasDrawBenchmark.Draw(Shapes: 64) 1.66 ms 1.45 ms 🟢 -13%
ColorMathBenchmark.ToColorF(Colors: 4096) 5.57 µs 4.91 µs 🟢 -12%
MatrixMapPointsBenchmark.MapPoint(Points: 4096) 20.51 µs 18.20 µs 🟢 -11%
SceneRenderBenchmark.RenderFrame(Complexity: 1) 1.42 ms 1.27 ms 🟢 -11%
RuntimeEffectShaderBenchmark.DrawFrame 617.52 µs 552.90 µs 🟢 -10%
MatrixMapPointsBenchmark.MapRect(Points: 4096) 51.62 µs 46.89 µs 🟢 -9%
RasterImageLifecycleBenchmark.CreateDataWithReleaseProc(Count: 256) 76.82 µs 81.51 µs 🔴 +6%
ColorMathBenchmark.ToColor(Colors: 4096) 19.75 µs 18.61 µs 🟢 -6%
MatrixMapPointsBenchmark.MapRadius(Points: 256) 6.42 µs 6.10 µs 🟢 -5%

📈 Full interactive perf-dashboard & run details →

@mattleibow
mattleibow force-pushed the mattleibow-fix-benchmark-source-msvc-init branch 3 times, most recently from bcdcad3 to 29d18a0 Compare July 30, 2026 02:21
@mattleibow mattleibow changed the title [CI] Ask the benchmark runner for the Windows SDK it actually has [Windows] Detect the Windows SDK instead of hardcoding a version Jul 30, 2026
@mattleibow
mattleibow force-pushed the mattleibow-fix-benchmark-source-msvc-init branch from 29d18a0 to d536e1a Compare July 30, 2026 02:36
@mattleibow mattleibow changed the title [Windows] Detect the Windows SDK instead of hardcoding a version [Windows] Stop pinning a Windows SDK version for vcvarsall Jul 30, 2026
@mattleibow
mattleibow force-pushed the mattleibow-fix-benchmark-source-msvc-init branch from d536e1a to 7a3e822 Compare July 30, 2026 02:44
The `benchmark-source (windows-latest, ...)` leg of Track - Benchmarks died
immediately after "Initializing the Visual C++ environment once for amd64."
with `Process 'cmd.exe' failed with error: 1` and no other output.

RunNinjaWithVcVars ran `vcvarsall.bat amd64 10.0.22621.0 -vcvars_ver=14.2 >nul`.
That version was the default of the new windowsSdkVersion argument and matches
the AzDO agents, but the hosted runner is windows-2025-vs2026 and ships only
Windows SDK 10.0.26100.0. vcvarsall hard-fails on an SDK that is not installed:

  [ERROR:winsdk.bat] Windows SDK 10.0.22621.0 : '...\include\...\um' not found

and `>nul` swallowed that message whole, leaving only the cmd exit code.

Nothing needed that default. gn resolves the SDK itself when it is not pinned,
which is what happened before the MSVC environment was initialized explicitly,
and it emits the result as explicit -imsvc and /LIBPATH: flags. Hardcoding a
version only meant the build broke on any machine that did not happen to have it.

Default the argument to empty and omit it from both gn and vcvarsall when unset,
so each detects an SDK that exists. Setting it still pins both, so a specific SDK
can be selected locally, and dropping `>nul` means the next failure says why.

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: c396b794-0f5c-4c37-a021-54ab7c95a5cf
@mattleibow
mattleibow force-pushed the mattleibow-fix-benchmark-source-msvc-init branch from 7a3e822 to fa12e1d Compare July 30, 2026 02:48
@mattleibow mattleibow changed the title [Windows] Stop pinning a Windows SDK version for vcvarsall [Windows] Stop pinning a Windows SDK version by default Jul 30, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📖 Documentation Preview

The documentation for this PR has been deployed and is available at:

🔗 View Staging Site
🔗 View Staging Docs
🔗 View Staging Gallery (Blazor)
🔗 View Staging Gallery (Uno Platform)
🔗 View Staging SkiaFiddle

This preview will be updated automatically when you push new commits to this PR.


This comment is automatically updated by the documentation staging workflow.

@github-actions

Copy link
Copy Markdown
Contributor

📦 Artifact size report

Packages from this PR (build 1532613) vs the latest nightly baseline 4.151.0-nightly.109 (observed 2026-07-29).

Total .nupkg size: 569.3 MB → 568.9 MB (−435.5 KB, -0.1%)

Packages

⚠️ marks growth over 500.0 KB or 2%. Changes under 50.0 KB are treated as noise.

Package baseline this PR Δ Δ%
SkiaSharp.NativeAssets.WinUI 109.0 MB 108.5 MB 🟢 −566.0 KB -0.5%
HarfBuzzSharp.NativeAssets.Win32 20.7 MB 20.8 MB 🔴 +64.8 KB +0.3%

+38 package(s) unchanged (< 50.0 KB).

Per-file changes

HarfBuzzSharp.NativeAssets.Win32

File Size
runtimes/win-x86/native/libHarfBuzzSharp.pdb 22.0 MB → 22.2 MB (🔴 +264.0 KB)
runtimes/win-arm64/native/libHarfBuzzSharp.pdb 22.3 MB → 22.5 MB (🔴 +192.0 KB)

SkiaSharp.NativeAssets.WinUI

File Size
runtimes/win-x64/native/libGLESv2.pdb 66.7 MB → 66.6 MB (🟢 −112.0 KB)
runtimes/win-arm64/native/libGLESv2.pdb 64.5 MB → 64.4 MB (🟢 −64.0 KB)
runtimes/win-x86/native/libGLESv2.pdb 67.2 MB → 67.2 MB (🟢 −32.0 KB)

Informational only — this never blocks the PR. Native binaries are labelled by os/arch.

@mattleibow
mattleibow merged commit 4dc14c9 into main Jul 30, 2026
115 checks passed
@mattleibow
mattleibow deleted the mattleibow-fix-benchmark-source-msvc-init branch July 30, 2026 15:35
mattleibow added a commit that referenced this pull request Jul 30, 2026
Brings in #4588, which fixes the benchmark-source native build: vcvarsall was
handed a Windows SDK version the hosted runner does not have, and >nul hid the
error. That was the one red GitHub check.

A docs review against the code found four contradictions:

The Mac Catalyst comment still said macOS 'is NOT opted out'. That was true when
written and stopped being true when macOS was opted out — the same stale claim
already fixed on the iOS leg, missed here.

review-skia-update's C# checklist still allowed 'no skipped tests (except
hardware-dependent: GPU, display)', which is exactly the inference this branch
removes.

gpu-test-policy claimed a backend is required on every host we build it for, and
that RequiredOn mirrors the gn args. Neither is literally true: the browser build
enables Ganesh without ganesh-gl being required there, and Tizen builds Ganesh
with no test leg at all. RequiredOn lists test hosts, and now says so.

golden-image-tests placed the Vulkan renderers in the Console satellite. The
sources are under tests/VulkanTests/ and also build into the platform-restricted
SkiaSharp.Vulkan.Tests library that the Android and Windows device hosts
register.

Also notes that a platform tag need not have goldens yet — tvos and
graphite-dawn.browser have none, so their first run fails as unseeded by design.
mattleibow added a commit that referenced this pull request Aug 4, 2026
[Windows] Stop pinning a Windows SDK version by default (#4588)

Context: #4588
Context: 7c23c53
Follow-up: #4589

The benchmark-source (windows-latest, Windows, native/windows) leg of
Track - Benchmarks died the instant it began the native build:

    Done. Made 114 targets from 63 files in 358ms
    Initializing the Visual C++ environment once for amd64.
    An error occurred when executing task 'libSkiaSharp'.
    Error: Process 'cmd.exe' failed with error: 1

RunNinjaWithVcVars invoked vcvarsall.bat with the default of the
windowsSdkVersion argument, 10.0.22621.0, which matches the AzDO agents.
The hosted runner is windows-2025-vs2026 and ships only Windows SDK
10.0.26100.0, and vcvarsall hard-fails on an SDK that is not installed:

    [ERROR:winsdk.bat] Windows SDK 10.0.22621.0 :
    'C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\um'
    not found or was incomplete

Nothing needed that default. Before the MSVC environment was initialized
explicitly there was no such argument at all: gn resolved win_sdk_version
itself and the toolchain interpolated that resolved value into the
vcvarsall command it generated, so the version was always one that
existed on the machine and the two could never disagree. Hardcoding a
constant only meant the build broke wherever that exact SDK was absent -
this runner today, and equally a developer box carrying just a newer one.

Default the argument to empty and omit it from both gn and vcvarsall when
unset, so each detects an SDK that is present. Setting it still pins both
together, so --windowsSdkVersion remains available to build against a
specific SDK.

  * drop the `>nul` that hid the failure. It suppressed the vcvarsall
    banner, but `>nul` redirects only stdout and VsDevCmd writes its
    errors there too, so it discarded the diagnosis along with the
    banner - rerunning with `2>nul` still prints the [ERROR:winsdk.bat]
    lines, while `>nul` yields nothing but the exit code. The banner is
    five lines per architecture and worth keeping in the log.
  * this went unnoticed because benchmark-source runs on pull requests
    only and is skipped on main, so #4570 merged green without the path
    ever being exercised.
  * whether the vcvarsall call is needed at all is left open in #4589:
    every tool is invoked by absolute path and gn emits the SDK include
    and lib directories as explicit -imsvc and /LIBPATH: flags, so it may
    be redundant for our LLVM-based configuration.

Co-authored-by: Matthew Leibowitz <[email protected]>
Co-authored-by: Copilot App <[email protected]>
@mattleibow mattleibow added this to the 4.152.0-preview.1 milestone Aug 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant