зеркало из https://github.com/github/ruby.git
YJIT: Show YJIT build option in RUBY_DESCRIPTION (#6738)
YJIT: Show YJIT profile in RUBY_DESCRIPTION
This commit is contained in:
Родитель
24cbc50c76
Коммит
05af417587
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче