mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
If --yjit-stats is given without RUBY_DEBUG, that should be an error.
This commit is contained in:
parent
364cdda0f1
commit
d1d3d2c0aa
1 changed files with 7 additions and 0 deletions
|
@ -1025,6 +1025,7 @@ rb_yjit_call_threshold(void)
|
|||
return rb_yjit_opts.call_threshold;
|
||||
}
|
||||
|
||||
// Can raise RuntimeError
|
||||
void
|
||||
rb_yjit_init(struct rb_yjit_options *options)
|
||||
{
|
||||
|
@ -1037,6 +1038,12 @@ rb_yjit_init(struct rb_yjit_options *options)
|
|||
|
||||
rb_yjit_opts.gen_stats |= !!getenv("YJIT_STATS");
|
||||
|
||||
#if !RUBY_DEBUG
|
||||
if(rb_yjit_opts.gen_stats) {
|
||||
rb_raise(rb_eRuntimeError, "--yjit-stats requires that Ruby is compiled with CPPFLAGS='-DRUBY_DEBUG=1'");
|
||||
}
|
||||
#endif
|
||||
|
||||
// Normalize command-line options to default values
|
||||
if (rb_yjit_opts.exec_mem_size < 1) {
|
||||
rb_yjit_opts.exec_mem_size = 256;
|
||||
|
|
Loading…
Add table
Reference in a new issue