summaryrefslogtreecommitdiff
path: root/ruby.c
diff options
context:
space:
mode:
authorTakashi Kokubun <[email protected]>2025-02-06 10:27:39 -0500
committerTakashi Kokubun <[email protected]>2025-04-18 21:52:55 +0900
commitd993307d4cf2eeac3c261d4fa4fa308ea3740830 (patch)
tree680fc1ad1c74abe1952b10490ac41793cdb86196 /ruby.c
parent43234138d6456ea2b9b65d2fc2c69a4fb769cef6 (diff)
Add --zjit option
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/13131
Diffstat (limited to 'ruby.c')
-rw-r--r--ruby.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/ruby.c b/ruby.c
index 49d6b3d091..9541fce9b8 100644
--- a/ruby.c
+++ b/ruby.c
@@ -106,6 +106,8 @@ void rb_warning_category_update(unsigned int mask, unsigned int bits);
X(frozen_string_literal) \
SEP \
X(yjit) \
+ SEP \
+ X(zjit) \
/* END OF FEATURES */
#define EACH_DEBUG_FEATURES(X, SEP) \
X(frozen_string_literal) \
@@ -342,9 +344,10 @@ usage(const char *name, int help, int highlight, int columns)
#if USE_YJIT
M("--yjit", "", "Enable in-process JIT compiler."),
#endif
+ M("--zjit", "", "Enable in-process JIT compiler."),
M("-h", "", "Print this help message; use --help for longer message."),
};
- STATIC_ASSERT(usage_msg_size, numberof(usage_msg) < 25);
+ STATIC_ASSERT(usage_msg_size, numberof(usage_msg) < 26);
static const struct ruby_opt_message help_msg[] = {
M("--backtrace-limit=num", "", "Set backtrace limit."),
@@ -1450,6 +1453,10 @@ proc_long_options(ruby_cmdline_options_t *opt, const char *s, long argc, char **
" You may need to install rustc to build Ruby with YJIT.");
#endif
}
+ else if (is_option_with_optarg("zjit", '-', true, false, false)) {
+ FEATURE_SET(opt->features, FEATURE_BIT(yjit));
+ // TODO
+ }
else if (strcmp("yydebug", s) == 0) {
if (envopt) goto noenvopt_long;
opt->dump |= DUMP_BIT(yydebug);