Reflect custom ruby branch changes

This commit is contained in:
Struma 2020-12-31 22:37:26 -05:00 committed by Roza
parent 8f78a4cf17
commit 9a4c53e6fe
2 changed files with 10 additions and 9 deletions

View file

@ -775,7 +775,7 @@ static void showExc(VALUE exc, const BacktraceData &btData) {
} }
static void mriBindingExecute() { static void mriBindingExecute() {
#if RAPI_MAJOR > 2 #if RAPI_MAJOR >= 2
/* Normally only a ruby executable would do a sysinit, /* Normally only a ruby executable would do a sysinit,
* but not doing it will lead to crashes due to closed * but not doing it will lead to crashes due to closed
* stdio streams on some platforms (eg. Windows) */ * stdio streams on some platforms (eg. Windows) */
@ -789,15 +789,14 @@ static void mriBindingExecute() {
#else #else
ruby_init(); ruby_init();
rb_eval_string("$KCODE='U'"); rb_eval_string("$KCODE='U'");
#endif #ifdef MKXPZ_JIT
const char *rubyOpts[] = {"--jit-verbose=1"};
#if RAPI_MAJOR >= 3 void *node = ruby_process_options(1, const_cast<char**>(rubyOpts);
void* node = ruby_process_options(argc, argv);
int state; int state;
bool valid = ruby_executable_node(node, &state); bool valid = ruby_executable_node(node, &state);
state = ruby_exec_node(node); state = ruby_exec_node(node);
#endif #endif
#endif
#if defined(MKXPZ_ESSENTIALS_DEBUG) && !defined(__WIN32__) #if defined(MKXPZ_ESSENTIALS_DEBUG) && !defined(__WIN32__)
char *tmpdir = getenv("TMPDIR"); char *tmpdir = getenv("TMPDIR");

View file

@ -35,7 +35,8 @@ RUBY_CONFIGURE_ARGS := \
--enable-install-static-library \ --enable-install-static-library \
--enable-shared \ --enable-shared \
--disable-install-doc \ --disable-install-doc \
--with-out-ext=openssl,fiddle,gdbm,win32ole,win32 \ --with-out-ext=fiddle,gdbm,win32ole,win32 \
--with-static-linked-ext \
--disable-rubygems \ --disable-rubygems \
${EXTRA_RUBY_CONFIG_ARGS} ${EXTRA_RUBY_CONFIG_ARGS}
@ -287,6 +288,7 @@ $(LIBDIR)/libruby.a: $(DOWNLOADS)/ruby18/Makefile
$(DOWNLOADS)/ruby18/Makefile: $(DOWNLOADS)/ruby18/configure $(DOWNLOADS)/ruby18/Makefile: $(DOWNLOADS)/ruby18/configure
cd $(DOWNLOADS)/ruby18; \ cd $(DOWNLOADS)/ruby18; \
$(CONFIGURE) \ $(CONFIGURE) \
--with-static-linked-ext \
$(RUBY_FLAGS) $(RUBY_FLAGS)
$(DOWNLOADS)/ruby18/configure: $(DOWNLOADS)/ruby18/*.c $(DOWNLOADS)/ruby18/configure: $(DOWNLOADS)/ruby18/*.c