runtime: retain the TLS directory in the /GA test fixture #773

Merged
moffington merged 1 commit from upstream-pr/773 into main 2026-11-24 14:37:44 +00:00
moffington commented 2026-11-24 13:39:56 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by moffington on 2026-11-24T13:39:56Z.


Claimed in the coordination issue as: loader_tls /GA fixture

What and why

clang-cl's /GA removes the fixture's only _tls_index reference. lld-link then omits the PE TLS directory, so the loader never reaches the TLS rewrite. Add /INCLUDE:_tls_used to tiny_ga_tls and make the index assertion reject kNoTlsIndex. #532 independently reports the same seven failures on Windows with clang-cl and xwin.

Tested

  • Omarchy Linux, Wine 11.20, clang-cl/lld-link 23.1.3, xwin 0.10.0. Unpatched 2d73c242f failed 7 of 95 checks. The fix restores the TLS directory, rewrites two sites per load, and passes 95 of 95 checks, including when applied to refreshed main at 47c651174.
  • All 15 focused loader CTests passed. loader_tls passed in Debug, Release, RelWithDebInfo, and MinSizeRel. Fixtures built with MSVC 19.44 and link.exe 14.44 also passed in all four configurations under Wine.

Pre-existing failure. The expanded run passed 28 of 29 tests. run_startup_cmdline also fails on unpatched main in the standalone fixture check before invoking the loader.

GPUs tested: NVIDIA GeForce RTX 3060, driver 615.78.08, Omarchy Linux (Vulkan frame tests). TLS tests are CPU-only.

AI-assisted: yes

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5473248579 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/773). Originally posted by [moffington](https://github.com/moffington) on 2026-11-24T13:39:56Z. --- Claimed in the coordination issue as: [loader_tls /GA fixture](https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7133148588) ### What and why clang-cl's `/GA` removes the fixture's only `_tls_index` reference. lld-link then omits the PE TLS directory, so the loader never reaches the TLS rewrite. Add `/INCLUDE:_tls_used` to `tiny_ga_tls` and make the index assertion reject `kNoTlsIndex`. #532 independently reports the same seven failures on Windows with clang-cl and xwin. ### Tested - Omarchy Linux, Wine 11.20, clang-cl/lld-link 23.1.3, xwin 0.10.0. Unpatched `2d73c242f` failed 7 of 95 checks. The fix restores the TLS directory, rewrites two sites per load, and passes 95 of 95 checks, including when applied to refreshed `main` at `47c651174`. - All 15 focused loader CTests passed. `loader_tls` passed in Debug, Release, RelWithDebInfo, and MinSizeRel. Fixtures built with MSVC 19.44 and `link.exe` 14.44 also passed in all four configurations under Wine. **Pre-existing failure.** The expanded run passed 28 of 29 tests. `run_startup_cmdline` also fails on unpatched `main` in the standalone fixture check before invoking the loader. GPUs tested: NVIDIA GeForce RTX 3060, driver 615.78.08, Omarchy Linux (Vulkan frame tests). TLS tests are CPU-only. AI-assisted: yes
moffington commented 2026-11-25 13:16:30 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by moffington on 2026-11-25T13:16:30Z.


Discord user is col0038

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7163540134 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/773#issuecomment-7163540134). Originally posted by [moffington](https://github.com/moffington) on 2026-11-25T13:16:30Z. --- Discord user is col0038
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
ProjectLeonida/mandy!773
No description provided.