Repository navigation
build(cmake): compile the Windows test exit wrapper once for every test - #10124
oneandonlydean merged 1 commit into
Conversation
|
This pull request is labeled |
MarcZX10
left a comment
There was a problem hiding this comment.
I reviewed the exact head 196f87f. The OBJECT-library approach appears sound for the described MinGW setup: the wrapper has no per-target definitions/includes, add_link_options is established before the object target, and the --wrap=main option remains on each executable. The reported Ninja rule count and before/after build measurements are useful and directly measure this build-time change; the scene-trace request from the generic perf label does not fit a build-only performance claim. Local checks on this exact head: git diff --check upstream/main...HEAD and python3 tools/check_conventions.py --base upstream/main pass. The host CI had Linux/macOS relinker and ASan pass when checked; Windows and macOS x86_64 relinker jobs were still running, while full Linux/Windows jobs were skipped by path policy. No local MinGW build was run. I found no blocking issue in the inspected diff.
196f87f to
64da59d
Compare
|
@MarcZX10 thank you for the review. Since this is a build-time change and has no runtime path to trace, I retitled it AI-assisted: yes (Claude Code) |
|
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.
|
MarcZX10
left a comment
There was a problem hiding this comment.
The re-reviewed head is 64da59d. It still applies cleanly, but the repository now has main at e3d03fb and python3 tools/check_main_sync.py reports this branch is 694 commits behind its merge base. Since the contribution checklist requires current main, please rebase this build-system change onto the current tip and rerun the conventions check and relevant build/relinker validation. The earlier Windows full-build evidence covers the former base; it does not validate integration with the current tree. The latest hosted relinker matrix on the former head passes, while the regular Linux/Windows jobs were skipped. No MinGW build was independently run here.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
64da59d to
94d9c6a
Compare
|
@MarcZX10 rebased onto AI-assisted: yes (Claude Code) |
MarcZX10
left a comment
There was a problem hiding this comment.
Re-reviewed exact head 94d9c6a73f74ed1caf9a3f4ee6068d3a9055cb30. The change remains limited to compiling the Windows test-exit wrapper as a shared object and linking it to test targets. Exact-head conventions and diff checks pass. The author reports one wrapper compile rule and a full Windows run of 2,013/2,016 tests; the three failures are the already-known AMD sample_order failures and 18 expected feature/display/path skips. That run used main 32d86275b7; I checked the intervening current-main paths and found no changes to the root/library CMake or test-registration files used by this change. GitHub reports the PR clean and mergeable; hosted product jobs are path-skipped. Approved.
What
On MinGW,
add_test_executableaddscmake/WindowsTestExit.cpp(the--wrap=mainwrapper) as a source of every test executable. WithBUILD_TESTING=ONthe build compiles that file once for each of the 1,223 test executables. This PR compiles it once, in ananyps5_windows_test_exitOBJECT library defined in the top-levelCMakeLists.txtafter the global compile options. Every test executable then links its object through$<TARGET_OBJECTS:...>. The wrapper uses no target-specific definitions or include directories, so one object fits every test. The--wrap=mainlink option is unchanged.target_sourcesis used instead oftarget_link_libraries, so targets that use the plaintarget_link_librariessignature are not affected.Cost removed per full build. On a Ryzen AI 7 350 (Windows 11, WinLibs GCC 15.2, Release):
.ninja_logadd up to 8.6 CPU minutes (median 0.38 s).Builds after editing a source file or header don't compile the wrapper on
maineither, so this only shortens full builds: a new build directory, a compiler or flag change, or a CI runner without a cache.Tested
Windows 11 26300, WinLibs GCC 15.2.0, Release,
BUILD_TESTING=ON, Radeon 860M (AMD driver 32.0.13058.8001). Rebased ontomain32d86275b7(tools/check_main_sync.py: 1 ahead, 0 behind, clean), full build there:build.ninjahas one compile rule forWindowsTestExit.cpp, against 1,223 before. All test executables link its object.ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 ctest -j 4 --timeout 120: 2,013 of 2,016 pass, 18 skipped. The 18 skipped tests need a display (thevideo_out_flip_*group,guest_video_out_wqhd_detection_no_vulkan), Windows long-path support (long_paths) or a feature this device lacks (agc_host_import_sparse,agc_driver_ngg_vertex_wave_reduction,agc_driver_sparse_dma_buf_import). The same 18 skip on the former base.agc_driver_sample_order,agc_driver_sample_order_grid_referenceandagc_driver_sample_order_recipe_depth_locations. They fail the same way withmain'sCMakeLists.txt(2x scene with the standard locations: the slopes did not leave depth both at and below the clear value). This is the AMD Windows failure of AGC: agc_driver_sample_order_grid_reference loses the device on AMD's Windows driver with graphics pipeline libraries, passes with APS5_NO_GPL=1 #9507, addressed by test(agc): read the sample order tests' depth through a sampled copy #9056, fix(agc): give a depth stencil copy's layout barrier both aspects #9057 and fix(agc): bind the sample order depth set after its pipeline #9503.d339082d2e, the same suite at-j 4had 7 more failures from load (3 timeouts, 2 failures, 20xc0000409exits). All 7 passed when rerun one at a time.tools/check_conventions.py --base origin/mainpasses.tools/pr_overlap.py --branchreports no conflicting lines. Seven PRs that conflict withmainshareCMakeLists.txt: feat(input): add native SDL input configuration with ImGui #674, feat(aot): discuss native ARM64 compiler architecture and integration #1835, feat(aot): consolidate native ARM64 compiler, runtime and consumers #5021, test: organize library tests and label CTest suites #6044, Macos port #7201, feat: macOS host support (Apple Silicon via Rosetta 2, Vulkan on MoltenVK) #8658 and feat(opusdec): implement sceOpusDecCtl and sceOpusCeltDecCtl #9764. None of their diffs touchesadd_test_executableor the wrapper.Linux and macOS:
MINGWis false there, so they define no target and add nothing.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)