Skip to content

test-compile-async-without-collector runs on Linux too - #421

Merged
ASDAlexander77 merged 1 commit into
mainfrom
async-test-linux
Sep 30, 2026
Merged

ASDAlexander77 merged 1 commit into
mainfrom
async-test-linux

Conversation

@ASDAlexander77

Copy link
Copy Markdown
Owner

Summary

Turns on test-compile-async-without-collector (from #419) on Linux. It was registered for Windows only, and the script passes on Linux as it is.

Checked in WSL (Ubuntu, release)

At #418, before the split, Linux had the same bug.

  • The scheduler object (AsyncRuntime.cpp.o in libTypeScriptAsyncRuntime.a) referenced GC_allow_register_threads, GC_register_my_thread, GC_unregister_my_thread and GC_get_stack_base.
  • 00async_await.ts built with tslang --emit=exe failed to link under rc, none and own, at -O0 and -O3:
    undefined reference to `GC_register_my_thread'
    

At main (b213b9a):

  • Only AsyncGCThreads.cpp.o references those functions.
  • The program links and runs under gc, rc, none and own, at -O0 and -O3.
  • async-without-collector.cmake passes, both standalone and under ctest on this branch.
  • 00async_gc_threading.ts under gc had 0 failures in 20 runs at -O0 and 20 at -O3. The pool threads still register with the collector on Linux.
  • Linux ctest: 3301/3301.

The Linux CI job passed on #419 without showing any of this. Its tests link through test-runner, which always adds -lgc.

Change

  • CMakeLists.txt: the if (WIN32) guard around the registration goes.
  • async-without-collector.cmake: the comments now name both platforms' link errors, and say that the runner links the collector on both.

🤖 Generated with Claude Code

#419's split of the async runtime applies to the static library on Linux
as well, and before it the failure was the same there: checked in WSL at
#418, the scheduler's object (AsyncRuntime.cpp.o) referenced
GC_allow_register_threads, GC_register_my_thread, GC_unregister_my_thread
and GC_get_stack_base, and 00async_await.ts built with `tslang --emit=exe`
under rc, none and own failed to link ("undefined reference to
`GC_register_my_thread'"). At main only AsyncGCThreads.cpp.o references
them, and all four models link and run at -O0 and -O3.

The test was registered for Windows only; async-without-collector.cmake
passes as is on Linux, so the guard goes. Its comments name both
platforms' messages and linkers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ASDAlexander77
ASDAlexander77 merged commit 4f56bae into main Sep 30, 2026
2 checks passed
@ASDAlexander77
ASDAlexander77 deleted the async-test-linux branch September 30, 2026 21:12
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.

1 participant