cgen: add a __closure_init call for sokol/gg programs on android as well (#24892)

This commit is contained in:
xieke 2025-07-14 02:05:10 +08:00 committed by GitHub
parent fa904c495e
commit efd36b8917
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -208,6 +208,10 @@ sapp_desc sokol_main(int argc, char* argv[]) {
(void)argc; (void)argv;')
g.gen_c_main_trace_calls_hook()
if g.nr_closures > 0 {
g.writeln('\t__closure_init(); // main()')
}
if g.pref.gc_mode in [.boehm_full, .boehm_incr, .boehm_full_opt, .boehm_incr_opt, .boehm_leak] {
g.writeln('#if defined(_VGCBOEHM)')
if g.pref.gc_mode == .boehm_leak {