3c1be9f Enable YJIT support in Ruby 3.2.0.

1 file Authored by jaruga a year ago, Committed by vondruch a year ago,
1 file changed. 7 lines added. 0 lines removed.
    Enable YJIT support in Ruby 3.2.0.
    
    YJIT was introduced as a new feature in Ruby 3.1.0.[1] However, since the
    commit[2], the YJIT feature support was disabled as a default[3], and we need to set the
    `--enable-yjit` to the `configure` script to enable the YJIT support, and as
    the YJIT source code was ported from C to the Rust source, the `rustc` is
    required to build it.
    
    Note that the `rustc` is not used in the runtime process of the YJIT, because
    the YJIT does not generate the Rust code.[4] The static library `libyjit.a`
    built from the ``yjit/src/**/*.rs is linked in the build process to create the
    `libruby.so.3.2.0`, `miniruby` and `ruby` binary files.[4]
    
    In the Ruby 3.2.0, YJIT supports only the x86_64 and the aarch64 CPU
    environments.[1][5]
    
    The YJIT test files are executed in the `make check` if the YJIT is supported by
    `--enable-yjit`. That is equivalent with that the
    `test/lib/jit_support.rb#yjit_supported?` is `true`.[6]
    
    ```
    test/ruby/test_yjit_exit_locations.rb
    test/ruby/test_yjit.rb
    ```
    
    Note the Ruby's behavior is the same if the the `ruby`'s command `--yjit` or
    `--yjit-*` options are not specified.
    
    [1] https://www.ruby-lang.org/en/news/2021/12/25/ruby-3-1-0-released/
    [2] https://github.com/ruby/ruby/commit/f90549cd38518231a6a74432fe1168c943a7cc18
    [3] https://src.fedoraproject.org/rpms/ruby/pull-request/139
    [4] https://bugs.ruby-lang.org/issues/19120
    [5] https://www.ruby-lang.org/en/news/2022/09/09/ruby-3-2-0-preview2-released/
    [6] https://github.com/ruby/ruby/commit/1d64a5a7c09d1029508b6b3cb3d04e5a939bc8f8
    
        
file modified
+7 -0