[ruby-cvs:69711] k0kubun:r62530 (trunk): version.c: show +JIT when --jit is passed

k0kubun at ruby-lang.org k0kubun at ruby-lang.org
Thu Feb 22 23:53:17 JST 2018


k0kubun	2018-02-22 23:53:17 +0900 (Thu, 22 Feb 2018)

  New Revision: 62530

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=62530

  Log:
    version.c: show +JIT when --jit is passed
    
    in version output.
    version.h: ditto
    ruby.c: propagate option for it
    common.mk: updated dependency for version.c
    
    mjit.c: overwrites the RUBY_DESCRIPTION to have +JIT when --jit is passed
    
    test/ruby/test_rubyoptions.rb: add test for them
    
    Only `ruby --jit -v` will have "+JIT", but this is intentional.
    This may not be convenient for debugging by ticket with `ruby -v`,
    but it's convenient for benchmark tools that pass options (--jit)
    when showing it. At least such behavior is planned for benchmark_driver.gem
    and this behavior is designed for it. Other benchmark tools are
    recommended to follow the behavior too if they show version.
    RUBY_DESCRIPTION might be useful for it too.
    
    The position of "+JIT" is changed from original proposal because other
    platforms like JRuby and TruffleRuby end it with archtecture.
    It's made similar to JRuby, but it's upper-cased because Matz made approval
    for "+JIT" in the ticket.
    
    Example:
    $ ruby -v
    ruby 2.6.0dev (2018-02-22 trunk 62529) [x86_64-linux]
    $ ruby --jit -v
    ruby 2.6.0dev (2018-02-22 trunk 62529) +JIT [x86_64-linux]
    
    After --jit is made default in the future, this output may be removed.
    So do not rely on this output if possible.
    
    [Feature #14462]

  Modified files:
    trunk/common.mk
    trunk/mjit.c
    trunk/ruby.c
    trunk/test/ruby/test_rubyoptions.rb
    trunk/version.c
    trunk/version.h


More information about the ruby-cvs mailing list