summaryrefslogtreecommitdiff
path: root/yjit.h
diff options
context:
space:
mode:
authorAaron Patterson <tenderlove@ruby-lang.org>2021-07-15 15:43:39 -0700
committerAlan Wu <XrXr@users.noreply.github.com>2021-10-20 18:19:38 -0400
commite8617d0e7ea8039f3757896f547107f51566256b (patch)
tree0ce51bfb188c7687c3d8c5cb69236c4efefec450 /yjit.h
parent41f405c486a01c1a16c3f102c11d41c8fbbafe60 (diff)
downloadruby-e8617d0e7ea8039f3757896f547107f51566256b.tar.gz
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.h')
-rw-r--r--yjit.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/yjit.h b/yjit.h
index 0e7a7b6c9b..5d27d4f4a7 100644
--- a/yjit.h
+++ b/yjit.h
@@ -14,6 +14,8 @@
#define PLATFORM_SUPPORTED_P 1
#endif
+#define JIT_ENABLED USE_MJIT
+
#ifndef YJIT_CHECK_MODE
#define YJIT_CHECK_MODE 0
#endif