Skip to content

fix(build): allow static MinGW runtimes in relinker-only tests - #8067

Merged
oneandonlydean merged 1 commit into
boykopovar:mainfrom
harry-z-kang:codex/relinker-static-mingw-tests
Oct 20, 2026
Merged

oneandonlydean merged 1 commit into
boykopovar:mainfrom
harry-z-kang:codex/relinker-static-mingw-tests

Conversation

@harry-z-kang

@harry-z-kang harry-z-kang commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

What

Windows relinker-only builds with BUILD_TESTING=ON reject MinGW distributions that ship static runtimes, such as Scoop GCC 15.2.0: configuration requires three runtime DLLs even though this mode does not build the PRX libraries.

Allow missing runtime DLLs when ANYPS5_RELINKER_ONLY=ON. Continue copying each DLL that is present, so WinLibs fixtures retain their runtime dependencies. Full builds still require all three DLLs and retain the existing DWARF-unwinding requirement. Clarify the distinction in the relinker-only build instructions.

Overlap review (2026-10-19, main 8038a425f). The scan covered 697 open PRs and found no confirmed conflict involving this PR. The bot lists 10 incomplete comparisons because those other branches already conflict with main. Their current shared-file patches were reviewed manually:

PRs Shared changes and integration result
#674, #1835, #5021, #6879 Input tools, ARM64/native graphics and WebAssembly build modes or documentation; no competing Windows runtime-DLL policy.
#6746, #6947, #7642 Test registration or include-path additions outside the runtime-DLL copy loop.
#6044 Test-definition reorganization; no competing static-runtime policy.
#7201, #7332 macOS build/documentation changes, independent of the Windows runtime-DLL policy.

This PR has no prerequisite. #8087 is stacked on this exact commit and declares the dependency. The remaining bot warnings require the other branches to be updated against main before automatic comparisons can finish.

Tested

Latest verification on main 8038a425f: Scoop GCC 15.2.0 relinker-only build passed; 212 CTest cases passed, one long_paths skip, zero failures (89.10 s). The rebased patch is unchanged. Conventions and whitespace checks passed. Earlier qualification follows.

Windows 11 (NT build 26300), Release, Ninja, on main e004d03ce plus this change.

  • Reproduced the baseline configure failure with Scoop GCC 15.2.0: Cannot locate MinGW runtime: libgcc_s_seh-1.dll.
  • Configured and built all relinker-only test targets with both Scoop GCC 15.2.0 and WinLibs GCC 15.2.0 r7, using ANYPS5_RELINKER_ONLY=ON and BUILD_TESTING=ON.
  • Scoop (b/rs): 211 CTest cases passed, zero failures, one skip. Its test directory contains none of the three MinGW runtime DLLs; its test environment excludes the WinLibs bin directory.
  • WinLibs (b/rw): 210 cases passed, one skip and one shader_cache_runtime_sources cleanup error (WinError 32, temporary file held open). That case passed on an isolated rerun. All runnable cases therefore passed across the full run and rerun. The three copied runtime DLLs match the compiler's originals byte for byte.
  • long_paths is the skipped case in both configurations because this host has LongPathsEnabled=0. Short build directories avoid the existing path-length-sensitive input_preservation fixture; both it and windows_diagnostic_fixture_isolation passed with both compilers.
  • The full-build configure with Scoop and testing enabled still rejects the missing runtime DLLs.
  • Conventions, whitespace and test-registration checks passed; each configuration has 29 registered test executables and no built executable missing from CTest.

Builds used cmake --build b/rs --parallel 8 and cmake --build b/rw --parallel 8; complete suites used ctest --test-dir b/rs --output-on-failure --parallel 4 and the same command for b/rw. Linux and macOS were not run locally.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes

@github-actions

github-actions Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

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.

Pull request Shared files not compared
PR 674 CMakeLists.txt
docs/dev/BUILD.md
PR 1835 CMakeLists.txt
docs/dev/BUILD.md
PR 5021 CMakeLists.txt
docs/dev/BUILD.md
PR 6044 CMakeLists.txt
PR 6879 CMakeLists.txt
docs/dev/BUILD.md
PR 6946 CMakeLists.txt
PR 6947 CMakeLists.txt
PR 7201 CMakeLists.txt
PR 7332 CMakeLists.txt
docs/dev/BUILD.md
PR 7642 CMakeLists.txt

@wachi35676

Copy link
Copy Markdown
Contributor

Verdict: confirmed (configure step).

Environment: Windows 11 Home 10.0.26300, CMake 4.3.1, Ninja. The compiler is WinLibs GCC 15.2.0 r7, run from a directory without the runtime DLLs: bin/ holds hard links to every WinLibs .exe but none of libgcc_s_seh-1.dll, libstdc++-6.dll and libwinpthread-1.dll, and lib/, libexec/, include/ and x86_64-w64-mingw32/ are junctions to WinLibs. That directory is passed as CMAKE_C_COMPILER/CMAKE_CXX_COMPILER.

configure main 9127ea3 this PR merged onto it
-DANYPS5_RELINKER_ONLY=ON -DBUILD_TESTING=ON CMake Error at CMakeLists.txt:47: Cannot locate MinGW runtime: libgcc_s_seh-1.dll Generating done
full build, -DBUILD_TESTING=ON same error same error (unchanged, as intended)

With the normal WinLibs directory, the relinker-only build of this PR configures and builds, and ctest -j4 passes 212/212. The three DLLs are present in tests/. That build directory was reused from earlier builds, so their presence does not show the copy itself.

I did not build or run the suite with a genuinely static-runtime toolchain (Scoop GCC). This DLL-less compiler directory still links dynamically, so it shows only the configure behaviour.

AI-assisted: yes (Claude Code); results above were run on this machine.

@harry-z-kang
harry-z-kang force-pushed the codex/relinker-static-mingw-tests branch from a1fb06d to 995c10e Compare October 19, 2026 23:52
@oneandonlydean oneandonlydean self-assigned this Oct 20, 2026
@oneandonlydean
oneandonlydean merged commit df61228 into boykopovar:main Oct 20, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants