Repository navigation
feat(windows): support MSYS2 GCC runtime builds - #8087
Conversation
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
2f155a0 to
5f4b49c
Compare
5f4b49c to
8909edf
Compare
|
Thanks, this is careful work. Two questions while this waits for a maintainer decision on the extra Windows CI lane:
|
|
Thanks for this. We'd like to take MSYS2 GCC support, with one change to how its CI runs and two small things to sort out first.
#8067 is merged now, so a rebase onto main should leave just your own commit. |
8909edf to
23e4047
Compare
|
Addressed in commit 23e4047:
Rebased onto main |
23e4047 to
2734ac7
Compare
a97e45b to
4e9854e
Compare
What
MSYS2 GCC could not build the full Windows runtime with its native SEH exception model. Support System V ABI SEH frames alongside the existing WinLibs DWARF path, identify project GCC personalities, and preserve guest/host cleanup, typed catches, rethrow and register restoration. Includes the required pthread startup, makecontext frame, thread-description lookup and ATRAC9 fixture fixes.
MSYS2 qualification runs in the separate Windows MSYS2 workflow nightly at 08:23 UTC and through
workflow_dispatch. The regular WinLibs Build workflow is unchanged. Full builds with testing enabled retain the configure-time error for missing runtime DLLs; MSYS2 supplies all three beside the compiler. Relinker-only static-runtime support from merged #8067 is preserved.Standalone Scoop GCC 15.2 remains unsupported for full runtime builds: disabling SEH selects SjLj, and its SEH backend cannot compile System V catch handlers. MSYS2 UCRT64 GCC 16.2.0-6 carries the compiler fix. Unmarked native handlers and SjLj remain in libc debt.
The SHA-1 relinker execution test now reports its instruction bytes, sample, RAX, RCX and RFLAGS when preservation fails. Its register, flag and result checks are unchanged.
Windows TLS coverage fixtures now use the existing bounded cleanup retry helper when a finished executable is temporarily locked. Fixture assertions and the 30-second test timeout are unchanged.
Tested
tls_function_coverage_displacement_r8: all fixture checks completed, butTemporaryDirectoryfailed to remove an executable withWinError 32. A deterministic local reproduction held a real Windows file handle after execution: the original cleanup failed after 12 successful fixture runs, and the fix waited for release and removed the directory. An injected TLS assertion failure still propagated after cleanup.ctest --test-dir b/rw --label-regex '^tls_function_coverage$' --repeat until-fail:3 --parallel 4 --output-on-failure --timeout 30(99 executions, 19.61 s). Conventions and whitespace checks passed.6ef5a1c4c, head4e9854ea2: both commit patches are unchanged. Rebuilt the focused MSYS2 runtime targets; all 36 tests passed (12.31 s). Conventions, whitespace and Actionlint passed.cecb540a6, the affected runtime targets built successfully; all 36 focused MSYS2 tests and all seven WinLibs GCC 15.2 mutex/condition-variable tests passed, including explicit adaptive-mutex initialization.amd64_only_converterunder macOS 26 Rosetta withSHA-1 stub changed a general register or RFLAGS. The relinker implementation is unchanged from main. The failure did not reproduce in 20 unmodified Linux/WSL runs or 100 native Intel macOS runs. The diagnostic change passed another 20 Linux/WSL runs and the upstream Rosetta job. The underlying cause remains unconfirmed; no preservation assertion was removed or relaxed.e41fb9db5, Windows NT 26300: rebuilt the focused MSYS2 targets; all 29 unwind, exception, module-info, timer, context and ATRAC9 tests passed (10.43 s).BUILD_TESTING=ONconfiguration with standalone Scoop GCC fails immediately withCannot locate MinGW runtime: libgcc_s_seh-1.dll; relinker-only configuration with that same compiler succeeds. MSYS2 configuration succeeds with its adjacent runtime DLLs.libsbuild passed on base252cbc29b; CTest reported 1,670 passed, 19 skipped, 1 failed out of 1,690. The failure wasagc_driver_pass_input_hazard: a pass writing indices read by an open pass took no barrier. The same assertion reproduces with WinLibs GCC 15.2 r7 on the same PR code and machine; this comparison uses the DWARF and SEH paths of the branch.agc_driver_storage_file_writeandagc_driver_pm4passed under both toolchains with validation enabled.ANYPS5_REQUIRE_VULKAN=1,ANYPS5_NO_SHADER_CACHE=1andVK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation; verbose logs confirmed the layer loaded.agc_sparse_run_import_copiedpasses but logsVUID-vkCmdCopyBuffer-srcBuffer-00118under both toolchains. No GPU implementation files change.shader_cache_runtime_sourcesfixture taking 43.17 s in the full run / 36.10 s alone. No existing timeout was increased. WinLibs 15.2 r7 previously passed 32 focused runtime tests and eight final compatibility checks. Full Linux runtime qualification has not run locally.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)