diff --git a/binding/binding-mri.cpp b/binding/binding-mri.cpp index a6015874..8f3c6442 100644 --- a/binding/binding-mri.cpp +++ b/binding/binding-mri.cpp @@ -775,7 +775,7 @@ static void showExc(VALUE exc, const BacktraceData &btData) { } static void mriBindingExecute() { -#if RAPI_MAJOR > 2 +#if RAPI_MAJOR >= 2 /* Normally only a ruby executable would do a sysinit, * but not doing it will lead to crashes due to closed * stdio streams on some platforms (eg. Windows) */ @@ -789,16 +789,15 @@ static void mriBindingExecute() { #else ruby_init(); rb_eval_string("$KCODE='U'"); +#ifdef MKXPZ_JIT + const char *rubyOpts[] = {"--jit-verbose=1"}; + void *node = ruby_process_options(1, const_cast(rubyOpts); + int state; + bool valid = ruby_executable_node(node, &state); + state = ruby_exec_node(node); #endif - -#if RAPI_MAJOR >= 3 - void* node = ruby_process_options(argc, argv); - int state; - bool valid = ruby_executable_node(node, &state); - state = ruby_exec_node(node); #endif - #if defined(MKXPZ_ESSENTIALS_DEBUG) && !defined(__WIN32__) char *tmpdir = getenv("TMPDIR"); if (tmpdir) diff --git a/macos/Dependencies/dependencies.make b/macos/Dependencies/dependencies.make index b40c3e61..692ac29f 100644 --- a/macos/Dependencies/dependencies.make +++ b/macos/Dependencies/dependencies.make @@ -35,7 +35,8 @@ RUBY_CONFIGURE_ARGS := \ --enable-install-static-library \ --enable-shared \ --disable-install-doc \ - --with-out-ext=openssl,fiddle,gdbm,win32ole,win32 \ + --with-out-ext=fiddle,gdbm,win32ole,win32 \ + --with-static-linked-ext \ --disable-rubygems \ ${EXTRA_RUBY_CONFIG_ARGS} @@ -287,6 +288,7 @@ $(LIBDIR)/libruby.a: $(DOWNLOADS)/ruby18/Makefile $(DOWNLOADS)/ruby18/Makefile: $(DOWNLOADS)/ruby18/configure cd $(DOWNLOADS)/ruby18; \ $(CONFIGURE) \ + --with-static-linked-ext \ $(RUBY_FLAGS) $(DOWNLOADS)/ruby18/configure: $(DOWNLOADS)/ruby18/*.c