Skip to content

Commit efd36b8

Browse files
authored
cgen: add a __closure_init call for sokol/gg programs on android as well (#24892)
1 parent fa904c4 commit efd36b8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

vlib/v/gen/c/cmain.v

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,10 @@ sapp_desc sokol_main(int argc, char* argv[]) {
208208
(void)argc; (void)argv;')
209209
g.gen_c_main_trace_calls_hook()
210210

211+
if g.nr_closures > 0 {
212+
g.writeln('\t__closure_init(); // main()')
213+
}
214+
211215
if g.pref.gc_mode in [.boehm_full, .boehm_incr, .boehm_full_opt, .boehm_incr_opt, .boehm_leak] {
212216
g.writeln('#if defined(_VGCBOEHM)')
213217
if g.pref.gc_mode == .boehm_leak {

0 commit comments

Comments
 (0)