summaryrefslogtreecommitdiff
path: root/version.c
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2022-11-16 10:08:52 -0800
committerGitHub <noreply@github.com>2022-11-16 10:08:52 -0800
commit05af417587cf57142b66e5041b592fe67803a3db (patch)
tree55a4cece7d75d1d395df04614a60af54ef27d0ed /version.c
parent24cbc50c76f7ccc89f9510250359f3a405d9af68 (diff)
downloadruby-05af417587cf57142b66e5041b592fe67803a3db.tar.gz
YJIT: Show YJIT build option in RUBY_DESCRIPTION (#6738)
YJIT: Show YJIT profile in RUBY_DESCRIPTION
Diffstat (limited to 'version.c')
-rw-r--r--version.c7
1 files changed, 6 insertions, 1 deletions
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;