summaryrefslogtreecommitdiff
path: root/yjit.rb
diff options
context:
space:
mode:
authorAlan Wu <XrXr@users.noreply.github.com>2021-10-25 10:45:22 -0400
committerGitHub <noreply@github.com>2021-10-25 10:45:22 -0400
commit244c98e635a01cc7cfde9e24ed4b44413e6c3e75 (patch)
treef9e8a1fe841d1e4222d36bb42e58c06c5022aa2f /yjit.rb
parente943511455acfd70dc3bd085038969a11802d688 (diff)
Strip out YJIT at build time when unsupported or disabled (#5003)
In an effort to minimize build issues on non x64 platforms, we can decide at build time to not build the bulk of YJIT. This should fix obscure build errors like this one on riscv64: yjit_asm.c:137:(.text+0x3fa): relocation truncated to fit: R_RISCV_PCREL_HI20 against `alloc_exec_mem' We also don't need to bulid YJIT on `--disable-jit-support` builds. One wrinkle to this is that the YJIT Ruby module will not be defined when YJIT is stripped from the build. I think that's a fair change as it's only meant to be used for YJIT development.
Notes
Notes: Merged-By: maximecb <maximecb@ruby-lang.org>
Diffstat (limited to 'yjit.rb')
-rw-r--r--yjit.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/yjit.rb b/yjit.rb
index 79511685d1..cbd2ea1e44 100644
--- a/yjit.rb
+++ b/yjit.rb
@@ -1,3 +1,10 @@
+# This module allows for introspection on YJIT, CRuby's experimental in-process
+# just-in-time compiler. This module is for development purposes only;
+# everything in this module is highly implementation specific and comes with no
+# API stability guarantee whatsoever.
+#
+# This module is only defined when YJIT has support for the particular platform
+# on which CRuby is built.
module YJIT
if defined?(Disasm)
def self.disasm(iseq, tty: $stdout && $stdout.tty?)