YJIT: Show YJIT build option in RUBY_DESCRIPTION (#6738)

YJIT: Show YJIT profile in RUBY_DESCRIPTION
This commit is contained in:
Takashi Kokubun 2022-11-16 10:08:52 -08:00 коммит произвёл GitHub
Родитель 24cbc50c76
Коммит 05af417587
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
3 изменённых файлов: 10 добавлений и 2 удалений

Просмотреть файл

@ -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)])

Просмотреть файл

@ -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

Просмотреть файл

@ -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;