Skip to content

windows: integrate native Windows platform support - #169

Draft
cpunion wants to merge 183 commits into
mainfrom
codex/windows-proposal-integration-20260818
Draft

windows: integrate native Windows platform support#169
cpunion wants to merge 183 commits into
mainfrom
codex/windows-proposal-integration-20260818

Conversation

@cpunion

@cpunion cpunion commented Aug 18, 2026

Copy link
Copy Markdown
Owner

Part of xgo-dev#2325.

This draft is the single Windows integration and CI branch. It intentionally keeps the implementation together until native Windows support and its cross-platform regression coverage are complete. Reviewable upstream slices will be recreated only after this branch reaches that gate.

Integrated scope:

  • MSVC target triples, COFF linking, architecture feature flags, and cross-compilation configuration;
  • Windows C ABI lowering, FFI closures, system callbacks, and 386/amd64/arm64 calling-convention coverage;
  • native threads, synchronization, TLS, GC registration, defer, panic/recover, SEH unwinding, signals, filesystem/process support, IOCP, sockets, and testing hooks;
  • Windows-aware standard-library symbol coverage and repository test infrastructure;
  • guards against runtime or binary-size overhead on non-Windows targets.

Validation completed so far:

  • Windows 11 ARM64 local host/compiler, runtime, FFI, testing, protected-memory, and standard-library coverage checks;
  • Windows AMD64 GitHub host smoke and standard-library coverage checks;
  • Linux and macOS regression tests for shared runtime changes.

Completion gate for this integration PR:

  • full test/std/..., test/goroot, the remaining test/... language and LLGo-extension suites, and applicable demos on Windows;
  • Windows amd64, arm64, and 386 compile/runtime coverage where the toolchain supports execution;
  • cross-compilation toolchain validation;
  • review of runtime/standard-library diffs for Go source reuse and necessity;
  • Linux/macOS size, performance, and test regression checks.

Windows tests are not skipped to make the branch green. Platform-specific failures must either be fixed or explicitly classified with a documented reason.

@cpunion cpunion added the windows Windows platform support label Aug 18, 2026
@github-actions

github-actions Bot commented Aug 18, 2026

Copy link
Copy Markdown

LLGo baseline benchmarks

46fda6827fab | workflow run | long-term charts

Program measurements

Platform Workload File size vs base Build vs base Run vs base
Linux cprintf 19640 B +352 B / +1.8% (worse) 345.697 ms +14.41 ms / +4.4% (worse) 1.352 ms -18 us / -1.3% (better)
Linux cprintf-lto 19472 B +352 B / +1.8% (worse) 338.435 ms +5.971 ms / +1.8% (worse) 1.428 ms +1.377 us / +0.1% (worse)
Linux fmtprintf 1844080 B +4992 B / +0.3% (worse) 2.688 s -2.104 ms / -0.1% (better) 3.542 ms -23.23 us / -0.7% (better)
Linux fmtprintf-lto 1764016 B +4544 B / +0.3% (worse) 13.551 s -14.74 ms / -0.1% (better) 3.540 ms -23.94 us / -0.7% (better)
Linux println 69808 B +1032 B / +1.5% (worse) 339.872 ms +6.268 ms / +1.9% (worse) 1.683 ms -34.94 us / -2.0% (better)
Linux println-lto 63136 B +672 B / +1.1% (worse) 554.304 ms +5.503 ms / +1.0% (worse) 1.742 ms +6.345 us / +0.4% (worse)
macOS cprintf 84672 B 0 B / +0.0% 369.417 ms +28.12 ms / +8.2% (worse) 2.345 ms -13.17 us / -0.6% (better)
macOS cprintf-lto 100912 B 0 B / +0.0% 350.507 ms +39.51 ms / +12.7% (worse) 2.163 ms -46.58 us / -2.1% (better)
macOS fmtprintf 1877024 B +544 B / +0.02899% (worse) 2.006 s -166.5 ms / -7.7% (better) 11.498 ms +416.3 us / +3.8% (worse)
macOS fmtprintf-lto 1609920 B +208 B / +0.01292% (worse) 13.969 s +809.6 ms / +6.2% (worse) 6.080 ms +1.402 ms / +30.0% (worse)
macOS println 121840 B +480 B / +0.4% (worse) 345.892 ms +41.19 ms / +13.5% (worse) 3.534 ms +222.3 us / +6.7% (worse)
macOS println-lto 128688 B +160 B / +0.1% (worse) 432.270 ms +13.24 ms / +3.2% (worse) 2.658 ms -89.46 us / -3.3% (better)
Core language and compiler benchmarks
Platform Benchmark ns/op vs base
Linux BenchmarkLookupPCRandom 12.220 ns/op -0.03 ns/op / -0.2% (better)
Linux BenchmarkMergeCompilerFlags 144.500 ns/op -2.2 ns/op / -1.5% (better)
Linux BenchmarkMergeLinkerFlags 93.910 ns/op 0 ns/op / +0.0%
Linux BenchmarkChannelBuffered 36.350 ns/op +0.05 ns/op / +0.1% (worse)
Linux BenchmarkChannelHandoff 23614 ns/op -1409 ns/op / -5.6% (better)
Linux BenchmarkDefer 44.280 ns/op -0.73 ns/op / -1.6% (better)
Linux BenchmarkDirectCall 1.757 ns/op -0.001 ns/op / -0.1% (better)
Linux BenchmarkGlobalRead 1.757 ns/op -0.001 ns/op / -0.1% (better)
Linux BenchmarkGlobalWrite 2.808 ns/op -0.001 ns/op / -0.0356% (better)
Linux BenchmarkGoroutine 35399 ns/op +5298 ns/op / +17.6% (worse)
Linux BenchmarkInterfaceCall 8.929 ns/op -0.176 ns/op / -1.9% (better)
Linux BenchmarkRuntimeGetG 1.759 ns/op -0.353 ns/op / -16.7% (better)
macOS BenchmarkLookupPCRandom 13.210 ns/op +2.56 ns/op / +24.0% (worse)
macOS BenchmarkMergeCompilerFlags 142.400 ns/op +41.7 ns/op / +41.4% (worse)
macOS BenchmarkMergeLinkerFlags 86.630 ns/op +20.22 ns/op / +30.4% (worse)
macOS BenchmarkChannelBuffered 23.050 ns/op +2.1 ns/op / +10.0% (worse)
macOS BenchmarkChannelHandoff 8387 ns/op +2113 ns/op / +33.7% (worse)
macOS BenchmarkDefer 33.440 ns/op +6.44 ns/op / +23.9% (worse)
macOS BenchmarkDirectCall 1.112 ns/op -0.014 ns/op / -1.2% (better)
macOS BenchmarkGlobalRead 1.086 ns/op +0.065 ns/op / +6.4% (worse)
macOS BenchmarkGlobalWrite 1.043 ns/op -0.075 ns/op / -6.7% (better)
macOS BenchmarkGoroutine 55725 ns/op +24526 ns/op / +78.6% (worse)
macOS BenchmarkInterfaceCall 4.544 ns/op -0.291 ns/op / -6.0% (better)
macOS BenchmarkRuntimeGetG 2.129 ns/op +0.168 ns/op / +8.6% (worse)

Compared with 0314faeba69d measured in the same runner job.

@cpunion cpunion changed the title [depends on xgo-dev/llgo#2340] windows: integrate remaining proposal support windows: integrate native Windows platform support Aug 18, 2026
@cpunion
cpunion changed the base branch from llgo-agy-windows-stdlib-os-20260817 to main August 18, 2026 05:31
@cpunion
cpunion force-pushed the codex/windows-proposal-integration-20260818 branch 2 times, most recently from df754d4 to 7a07dcc Compare August 18, 2026 11:08
@cpunion
cpunion force-pushed the codex/windows-proposal-integration-20260818 branch from 7dbeafc to e3722fc Compare August 20, 2026 12:56
cpunion added 28 commits August 21, 2026 08:50
@cpunion
cpunion force-pushed the codex/windows-proposal-integration-20260818 branch from 3f62c91 to df9a2b3 Compare August 21, 2026 00:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

windows Windows platform support

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants