runtime: link no-relocation fixtures without incremental linking #2215
No reviewers
No assignees
Labels
No labels
bug
dependencies
documentation
enhancement
missing claim
needs rebase
needs-triage
question
ready-for-agent
submodules
No project
No milestone
Dependencies
No dependencies set
Notifications
1 participant
Due date
No due date set.
Reference
leonida/mandy!2215
Loading…
Reference in a new issue
No description provided.
Delete branch "runtime-incremental-no-reloc-fixtures"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Pull request successfully merged and closed
Summary
/INCREMENTAL:NOwhen linking fixture images that have no base relocations (/FIXEDor/NODEFAULTLIB)tiny_game_fixed,tiny_tls_cb_only,dll_thread_calls, andgameinput_hostItem: BUILD-INCREMENTAL-NO-RELOC-FIXTURES
This carries forward the still-uncarried fix in old-pr/10053, originally written by wavehs, reapplied and verified on current main. The original report measured MSVC 14.51.35927 crashing with
LNK1000inIncrCalcPtrson the default incremental relink of images with no base-relocation table; Microsoft fixed the linker itself in Visual Studio 2026 18.6, but non-incremental links are also correct for these fixtures.Tests
Under the local machine coordination lock:
runtime/CMakeLists.txt, finding all four vulnerable targetspython -I tests/test_runtime_incremental_link.py— 2 tests, OKpython -m compileall -q tests/test_runtime_incremental_link.py— passgit diff --cached --check— passNo game files or GPU.
AI-assisted with Devin.
Independent verification of head
e895cca95merged into currentmain(ec91d695c);runtime/CMakeLists.txtauto-merges.Machine: profile M (RTX 4070 SUPER 12 GB desktop, NVIDIA 621.01, Windows 11 Pro 26300, Ryzen 7 9800X3D), MSVC 14.52 (VS 2026, MSBuild generator), RelWithDebInfo,
LEONIDA_SDL3_FETCH=ON. No game files.Tests:
python -I tests/test_runtime_incremental_link.pyagainstmain'sruntime/CMakeLists.txt(viaLEONIDA_RUNTIME_CMAKE): fails, listingdll_thread_calls,gameinput_host,tiny_game_fixed,tiny_tls_cb_only. Against the merged file: 2 tests OK. So the guard catches what it should.run_tiny_game_fixed,run_tiny_game_fixed_exit_code,loader_tls*(4),dll_thread_calls,gameinput_host.Limits: my linker is MSVC 14.52 with the MSBuild generator, not 14.51 with Ninja, so I could not reproduce the
LNK1000crash. This run only shows that/INCREMENTAL:NOdoes no harm here.Small point: the PR body says the linker was fixed in VS 2026 18.6, but the new CMake comment says 18.6 crashes and it was "Fixed in VS 2026 18.7". One of them should change.
Full suite: this PR was tested together with #2173, #2152, #2170 and #2215 (they touch separate code) merged into
mainec91d695c.ctest -j 6: 500/502; the two failures,xbox_presentandd3d12_set_descriptor_heaps, fail on plainmainhere as well (known). Plainmainbaseline (first run in a fresh build dir): same two, plusxs_proxy_mock,d3d12_queue_handover_two_queuesand timeouts inbig_compile_gateandapi_ref_statethat still failed in a serial rerun there but pass on this tree. I take those as first-run noise onmain, not as something this PR fixes. No new failure.AI-assisted (Claude Code).
Independent verification on Windows 11 (
10.0.26200, x64) ofe895cca952merged onto currentorigin/main(59e65849b0,0git text conflicts), tested under bothPython 3.12.10andPython 3.14.5:PR + origin/main):origin/main'sruntime/CMakeLists.txtalone,python -I -B tests/test_runtime_incremental_link.pyfails (rc=1) listing 5 targets:['dll_thread_calls', 'fixed_base_probe', 'gameinput_host', 'tiny_game_fixed', 'tiny_tls_cb_only'].e895cca952merged ontoorigin/main(59e65849b0),python -I -B tests/test_runtime_incremental_link.pystill fails (rc=1) on bothPython 3.12.10andPython 3.14.5:['fixed_base_probe'] : linked with /FIXED or /NODEFAULTLIB but not /INCREMENTAL:NO.#2215's base,mainaddedfixed_base_probeatruntime/CMakeLists.txt:1461-1464with/NODEFAULTLIBand/FIXED(target_link_options(fixed_base_probe PRIVATE /NODEFAULTLIB /ENTRY:fixed_base_probe_main /FIXED /DYNAMICBASE:NO ...)), without/INCREMENTAL:NO. Adding/INCREMENTAL:NOtofixed_base_proberesolves both theLNK1000exposure on that new fixture and the test failure.git diff --check,python -I -m compileall -q tests/test_runtime_incremental_link.py,python -I scripts/check_no_game_data.py runtime/CMakeLists.txt tests/test_runtime_incremental_link.py,python -I tests/test_ctest_registration.py, andpython -I tests/test_ci_registration.py(18/18) all exited0.AI-assisted.
Tested
e895cca95merged (no commit) withmain53b77df14. GPUs tested: NVIDIA GeForce RTX 3080, driver 621.40, Windows 11 10.0.26300; MSVC 19.52 (Visual Studio 18), Ninja, RelWithDebInfo; Python 3.12.4.check_no_game_data.pyis clean.Blocker: its own test fails once merged with current
main.tests/test_runtime_incremental_link.pyreports['fixed_base_probe'] != [].fixed_base_probe, a/NODEFAULTLIBfixture added by #2525 since this branch, links without/INCREMENTAL:NO. The test does its job; the PR needs that fixture added. With the CMake change back tomain, the same test lists 4 targets, so it is red without the fix and goes green once the new fixture is covered.run_tiny_game_fixed,run_tiny_game_fixed_exit_code,dll_thread_calls,run_tiny_tls_ga) pass, and so do the 20 other tests of the 5 relinked executables. The LNK1000 itself needs a VS 2026 18.6 incremental relink, which I did not reproduce here.gta6rt.exelinks withoutws2_32.libwith nothing new overmain.AI-assisted (Claude Code).
TAKEN by OreoFR (Windows, RTX 4070 8 GB)
Verified by OreoFR — READY
runtime/CMakeLists.txt, viaLEONIDA_RUNTIME_CMAKE):python -I tests/test_runtime_incremental_link.pyfails, 5 targets without/INCREMENTAL:NO(dll_thread_calls, fixed_base_probe, gameinput_host, tiny_game_fixed, tiny_tls_cb_only).LEONIDA_CARGO=OFF,LEONIDA_XMA2_DECODER_LIBempty); imports unchanged vs main (25 DLLs, no WS2_32)AI-assisted (Claude Code, Claude Opus 5.5), run for OreoFR.
Ready to merge per the maintainers' plan (green, no conflict, tested).
Merged. Tested by OreoFR (RTX 4070 Laptop 8 GB, NVIDIA 621.40, Windows 11) on this head: the PR's test red against main's runtime/CMakeLists.txt, green with the PR (READY). AI-assisted: yes.