Skip to content

Haxe 5 nightly and hxcpp master: no program that uses Thread.current() builds #2

Open

Description

@Jarrio

The Haxe nightly of October 2026 (5.0.0-preview.1+35cbcb5, haxe-manager's nightly) can't build a program that calls sys.thread.Thread.current() against hxcpp master (504403d, 2026-10-20):

class Current {
	static function main() {
		trace(sys.thread.Thread.current() != null);
	}
}
./src/sys/thread/Tls.cpp:84:35: error: '::__hxcpp_tls_get' has not been declared
./src/sys/thread/Tls.cpp:92:28: error: '::__hxcpp_tls_set' has not been declared

The nightly's std/cpp/_std/sys/thread/Tls.hx calls __hxcpp_tls_get, which hxcpp master declares only below HXCPP_API_LEVEL 500 (include/hx/StdLibs.h), and Haxe 5 builds at 500.

The debug server uses Thread.current(), so no debug build is possible with that pair. Against the older hxcpp 7ea4343c, the nightly fails differently: closures in the debug server use std::type_index, which those headers don't declare.

The Haxe 5 preview (5.0.0-preview.1+066bd83) builds and debugs fine with hxcpp master. This is a mismatch between Haxe and hxcpp, not something to fix here. Not reported upstream.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions