diff options
author | Alan Wu <XrXr@users.noreply.github.com> | 2021-10-25 10:45:22 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-25 10:45:22 -0400 |
commit | 244c98e635a01cc7cfde9e24ed4b44413e6c3e75 (patch) | |
tree | f9e8a1fe841d1e4222d36bb42e58c06c5022aa2f /test | |
parent | e943511455acfd70dc3bd085038969a11802d688 (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 'test')
-rw-r--r-- | test/ruby/test_yjit.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/ruby/test_yjit.rb b/test/ruby/test_yjit.rb index 0905b68218..9b26e6c37f 100644 --- a/test/ruby/test_yjit.rb +++ b/test/ruby/test_yjit.rb @@ -3,7 +3,7 @@ require 'test/unit' require 'envutil' require 'tmpdir' -return unless YJIT.enabled? +return unless defined?(YJIT) && YJIT.enabled? # Tests for YJIT with assertions on compilation and side exits # insipired by the MJIT tests in test/ruby/test_jit.rb |