mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[WASM] System initialization has no stack rewinding code to Asyncify
This commit is contained in:
parent
2d1e7dfc36
commit
d2033d0f06
Notes:
git
2022-05-24 12:17:44 +09:00
Merged: https://github.com/ruby/ruby/pull/5929 Merged-By: nobu <nobu@ruby-lang.org>
1 changed files with 13 additions and 15 deletions
28
main.c
28
main.c
|
@ -32,6 +32,19 @@
|
|||
|
||||
static int
|
||||
rb_main(int argc, char **argv)
|
||||
{
|
||||
RUBY_INIT_STACK;
|
||||
ruby_init();
|
||||
return ruby_run_node(ruby_options(argc, argv));
|
||||
}
|
||||
|
||||
#if defined(__wasm__) && !defined(__EMSCRIPTEN__)
|
||||
int rb_wasm_rt_start(int (main)(int argc, char **argv), int argc, char **argv);
|
||||
#define rb_main(argc, argv) rb_wasm_rt_start(rb_main, argc, argv)
|
||||
#endif
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
#ifdef RUBY_DEBUG_ENV
|
||||
ruby_set_debug_option(getenv("RUBY_DEBUG"));
|
||||
|
@ -41,20 +54,5 @@ rb_main(int argc, char **argv)
|
|||
#endif
|
||||
|
||||
ruby_sysinit(&argc, &argv);
|
||||
{
|
||||
RUBY_INIT_STACK;
|
||||
ruby_init();
|
||||
return ruby_run_node(ruby_options(argc, argv));
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
#if defined(__wasm__) && !defined(__EMSCRIPTEN__)
|
||||
int rb_wasm_rt_start(int (main)(int argc, char **argv), int argc, char **argv);
|
||||
return rb_wasm_rt_start(rb_main, argc, argv);
|
||||
#else
|
||||
return rb_main(argc, argv);
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue