-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Add TruffleRuby to rvm #4406
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add TruffleRuby to rvm #4406
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -30,6 +30,9 @@ rbx-2[.5.8] | |
| rbx-3[.100] | ||
| rbx-head | ||
|
|
||
| # TruffleRuby | ||
| truffleruby[-1.0.0-rc2] | ||
|
|
||
| # Opal | ||
| opal | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -353,3 +353,4 @@ ruby-2.5.0 | |
| ruby-2.5.1 | ||
| ruby-2.6.0-preview1 | ||
| ruby-2.6.0-preview2 | ||
| truffleruby-1.0.0-rc2 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| truffleruby_install_check_llvm() | ||
| { | ||
| builtin command -v opt > /dev/null || | ||
| { | ||
| rvm_error "TruffleRuby requires LLVM to be installed to run native extensions. | ||
| For more details and for setup instructions for your system, please see: | ||
| https://github.com/oracle/truffleruby/blob/master/doc/user/installing-llvm.md" | ||
| return 1 | ||
| } | ||
| } | ||
|
|
||
| truffleruby_install() | ||
| { | ||
| truffleruby_install_check_llvm || return $? | ||
|
|
||
| __rvm_cd "${rvm_src_path}" | ||
|
|
||
| __rvm_fetch_ruby || return $? | ||
|
|
||
| __rvm_cd "${rvm_src_path}/${rvm_ruby_string}" | ||
|
|
||
| __rvm_apply_patches | ||
|
|
||
| __rvm_rm_rf "${rvm_ruby_home}" && \command \mkdir -p "$(dirname "${rvm_ruby_home}")" && | ||
| __rvm_log_command "install" "${rvm_ruby_string} - #installing to ${rvm_ruby_home}" \ | ||
| __rvm_cp -Rf "${rvm_src_path}/${rvm_ruby_string}" "${rvm_ruby_home}" || return $? | ||
|
|
||
| __rvm_cd "${rvm_ruby_home}" | ||
|
|
||
| # Run the TruffleRuby post-install hook | ||
| ./lib/truffle/post_install_hook.sh | ||
|
|
||
| # Avoid updating RubyGems for now as it seems fragile | ||
| rvm_rubygems_version="ignore" | ||
| __rvm_initial_gemsets_create "$rvm_ruby_home/bin/ruby" | ||
|
|
||
| __rvm_post_install | ||
|
|
||
| __rvm_fetch_ruby_cleanup | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -383,6 +383,7 @@ __rvm_ruby_string_find() | |
| else | ||
| __rvm_ruby_string_autodetect | ||
| case "${rvm_ruby_string}" in | ||
| # Should truffleruby-* be added here? | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should truffleruby-* be added here? It's not clear to me. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no need |
||
| (ruby-+([1-9])|ruby-+([1-9]).+([0-9])|ruby-1.+([1-9]).+([0-9])|jruby-[19]*) | ||
| __rvm_ruby_string_latest && | ||
| __rvm_ruby_string_parse_ || | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -30,6 +30,8 @@ __rvm_remote_extension() | |
| # params: ruby-string-to-transform | ||
| __rvm_ruby_package_file() | ||
| { | ||
| # What's this? Is it just for binary rubies? Do we need to change something for TruffleRuby? | ||
| # We already set rvm_ruby_package_file in __rvm_select_interpreter_truffleruby(). | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What's this function? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This would make sense if we install TruffleRuby, prepare binary for it, upload it to RVM binaries and then people download them, I'm not sure this would work with TruffleRuby license, but still could be used for multiserver deploys in private environment. I guess we can add this in separate PR. |
||
| case "$1" in | ||
| *.tar.*) | ||
| rvm_ruby_package_file="/$1" | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -259,6 +259,7 @@ external_select_name() | |
| fi | ||
| } | ||
|
|
||
| # Should we add an entry for truffleruby here? What's the purpose of this function? | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should I add an entry for truffleruby here?
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. see the comment in |
||
| external_propose_name() | ||
| { | ||
| \typeset parts __tmp1 __tmp2 | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: I updated
rvm.1.gzwithgzip -k rvm.1.