diff options
author | Alan Wu <[email protected]> | 2020-10-05 06:56:33 -0400 |
---|---|---|
committer | Alan Wu <[email protected]> | 2021-10-20 18:19:24 -0400 |
commit | 726bdd4d35861f0373d7508ab4ac7b2c781edf51 () | |
tree | 89f7a907fbd13cbd5106f54d6cacb00a4fa7c3e6 /version.c | |
parent | 12283c58dab63eb9f8e916a8647758260a3e699b (diff) |
Show whether MicroJIT is enabled in the version string
-rw-r--r-- | version.c | 31 |
1 files changed, 27 insertions, 4 deletions
@@ -13,6 +13,7 @@ #include "version.h" #include "vm_core.h" #include "mjit.h" #include <stdio.h> #ifndef EXIT_SUCCESS @@ -41,7 +42,9 @@ const char ruby_release_date[] = RUBY_RELEASE_DATE; const char ruby_platform[] = RUBY_PLATFORM; const int ruby_level = RUBY_LEVEL; const char ruby_description[] = RUBY_DESCRIPTION_WITH(""); static const char ruby_description_with_jit[] = RUBY_DESCRIPTION_WITH(" +JIT"); const char ruby_copyright[] = RUBY_COPYRIGHT; const char ruby_engine[] = "ruby"; @@ -102,10 +105,20 @@ Init_ruby_description(void) VALUE description; if (MJIT_OPTS_ON) { - description = MKSTR(description_with_jit); } else { - description = MKSTR(description); } /* @@ -118,10 +131,20 @@ void ruby_show_version(void) { if (MJIT_OPTS_ON) { - PRINT(description_with_jit); } else { - PRINT(description); } #ifdef RUBY_LAST_COMMIT_TITLE fputs("last_commit=" RUBY_LAST_COMMIT_TITLE, stdout); |