summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac3
-rw-r--r--test/ruby/test_rubyoptions.rb2
-rw-r--r--version.c7
3 files changed, 10 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index ca234e3c90..f6b81c4c15 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3821,6 +3821,9 @@ AS_CASE(["${YJIT_SUPPORT}"],
LDFLAGS="$LDFLAGS -lpthread -lc++abi"
])
YJIT_OBJ='yjit.$(OBJEXT)'
+ AS_IF([test x"$YJIT_SUPPORT" != "xyes" ], [
+ AC_DEFINE_UNQUOTED(YJIT_SUPPORT, [$YJIT_SUPPORT])
+ ])
AC_DEFINE(USE_YJIT, 1)
], [AC_DEFINE(USE_YJIT, 0)])
diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb
index 0198bbd900..15c9f293ed 100644
--- a/test/ruby/test_rubyoptions.rb
+++ b/test/ruby/test_rubyoptions.rb
@@ -14,7 +14,7 @@ class TestRubyOptions < Test::Unit::TestCase
if mjit_enabled?
RUBY_DESCRIPTION.sub(/\+MJIT /, '')
elsif yjit_enabled?
- RUBY_DESCRIPTION.sub(/\+YJIT /, '')
+ RUBY_DESCRIPTION.sub(/\+YJIT( (dev|dev_nodebug|stats))? /, '')
else
RUBY_DESCRIPTION
end
diff --git a/version.c b/version.c
index a2d278f2db..653a4238a9 100644
--- a/version.c
+++ b/version.c
@@ -60,6 +60,11 @@ const int ruby_api_version[] = {
#ifndef RUBY_FULL_REVISION
# define RUBY_FULL_REVISION RUBY_REVISION
#endif
+#ifdef YJIT_SUPPORT
+#define YJIT_DESCRIPTION " +YJIT " STRINGIZE(YJIT_SUPPORT)
+#else
+#define YJIT_DESCRIPTION " +YJIT"
+#endif
const char ruby_version[] = RUBY_VERSION;
const char ruby_revision[] = RUBY_FULL_REVISION;
const char ruby_release_date[] = RUBY_RELEASE_DATE;
@@ -67,7 +72,7 @@ const char ruby_platform[] = RUBY_PLATFORM;
const int ruby_patchlevel = RUBY_PATCHLEVEL;
const char ruby_description[] = RUBY_DESCRIPTION_WITH("");
static const char ruby_description_with_mjit[] = RUBY_DESCRIPTION_WITH(" +MJIT");
-static const char ruby_description_with_yjit[] = RUBY_DESCRIPTION_WITH(" +YJIT");
+static const char ruby_description_with_yjit[] = RUBY_DESCRIPTION_WITH(YJIT_DESCRIPTION);
const char ruby_copyright[] = "ruby - Copyright (C) "
RUBY_BIRTH_YEAR_STR "-" RUBY_RELEASE_YEAR_STR " "
RUBY_AUTHOR;