From b710785f1aaaa06bd5cd2e7a584c24aff20c9ab4 Mon Sep 17 00:00:00 2001 From: ko1 Date: Sat, 20 Oct 2018 06:53:00 +0000 Subject: add disabling MJIT features option. * configure.ac: introduce new configure option `--enable-mjit` and `--disable-mjit`. Default is "enable". `--disable-mjit` disables all of MJIT features so that `ruby --jit` can't enable MJIT. This option affect a macro `USE_MJIT`. This change remove `--enable/disable-install-mjit-header` option. * Makefile.in: introduce the `ENABLE_MJIT` variable. * common.mk: use `ENABLE_MJIT` option. * internal.h: respect `USE_MJIT`. Same as other *.c, *.h. * test/ruby/test_jit.rb: check `ENABLE_MJIT` key of rbconfg.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65204 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- version.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'version.c') diff --git a/version.c b/version.c index 36c2f05756..3215368e20 100644 --- a/version.c +++ b/version.c @@ -81,17 +81,24 @@ Init_version(void) rb_define_global_const("RUBY_ENGINE_VERSION", (1 ? version : MKSTR(version))); } +#if USE_MJIT +#define MJIT_OPTS_ON mjit_opts.on +#else +#define MJIT_OPTS_ON 0 +#endif + void Init_ruby_description(void) { VALUE description; - if (mjit_opts.on) { + if (MJIT_OPTS_ON) { description = MKSTR(description_with_jit); } else { description = MKSTR(description); } + /* * The full ruby version string, like ruby -v prints */ @@ -102,7 +109,7 @@ Init_ruby_description(void) void ruby_show_version(void) { - if (mjit_opts.on) { + if (MJIT_OPTS_ON) { PRINT(description_with_jit); } else { -- cgit v1.2.1