diff options
author | Aaron Patterson <tenderlove@ruby-lang.org> | 2021-07-15 15:43:39 -0700 |
---|---|---|
committer | Alan Wu <XrXr@users.noreply.github.com> | 2021-10-20 18:19:38 -0400 |
commit | e8617d0e7ea8039f3757896f547107f51566256b (patch) | |
tree | 0ce51bfb188c7687c3d8c5cb69236c4efefec450 /yjit_core.c | |
parent | 41f405c486a01c1a16c3f102c11d41c8fbbafe60 (diff) |
Make sure we can still compile with the JIT disabled
If `--disable-jit-support` is passed to configure, then `jit_func` is
removed from the iseq body and we can't compile YJIT. This commit
detects when the JIT function pointer is gone and disables YJIT in that
case.
Diffstat (limited to 'yjit_core.c')
-rw-r--r-- | yjit_core.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/yjit_core.c b/yjit_core.c index 8af35258b2..6e1659ca23 100644 --- a/yjit_core.c +++ b/yjit_core.c @@ -945,7 +945,10 @@ invalidate_block_version(block_t* block) // Clear out the JIT func so that we can recompile later and so the // interpreter will run the iseq + +#if JIT_ENABLED iseq->body->jit_func = 0; +#endif // TODO: // May want to recompile a new entry point (for interpreter entry blocks) |