Skip to content

test-input-focus: stub act_cycle_live - #1141

Open
gshlok wants to merge 1 commit into
Revivedx:testfrom
gshlok:fix/input-focus-cycle-stub
Open

gshlok wants to merge 1 commit into
Revivedx:testfrom
gshlok:fix/input-focus-cycle-stub

Conversation

@gshlok

@gshlok gshlok commented Nov 26, 2026

Copy link
Copy Markdown

What this changes

Follow-up to #1100, from @Dathinel's review there. runtime/hle/input.c calls act_cycle_live() (the Master Cycle check next to horse_riding()), and tools/test_input_focus.c doesn't define it. The test links with MSYS2's default linker, which drops the caller with --gc-sections and never notices. With lld it fails, because COFF lld reports undefined symbols before it discards sections:

ld.lld: error: undefined symbol: act_cycle_live

This adds a one-line stub next to the other act_* stubs that says Link isn't on the Cycle. Of the two fixes suggested in #1100 it's the narrower one: unlike adding GC_TEST_UNDEF to this rule, it keeps the link strict for symbols the test does reach.

How it was tested

Windows 11, MSYS2 UCRT64 (clang 23.1), on top of test at 63b7255:

  • before: make test-input-focus passes with the default linker, and with CC="clang -fuse-ld=lld" fails with the error above
  • after: input focus checks passed with both

Synthetic test only, no game files.

Checklist

  • Based on the latest test and opened against test
  • Built and run locally, and checked in the game (test-only change: built and ran the test, nothing to check in the game)
  • No game files, keys, firmware, generated game code or save files in the changes

🤖 Generated with Claude Code

input.c calls act_cycle_live (the Master Cycle check next to horse_riding),
which the test doesn't define. GNU ld drops the caller with --gc-sections and
never notices, but COFF lld reports the undefined symbol before it discards
sections, so the test fails to link with -fuse-ld=lld (llvm-mingw, for one).
A stub that says Link isn't on the Cycle keeps the link strict for symbols
the test does reach, instead of allowing unresolved ones.

Suggested by Dathinel in Revivedx#1100.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 26, 2026 04:59

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants