Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add support for JRuby 9000 bundled with the Graal VM
JRuby 9000 (the next major release) includes a backend that supports a
new JVM JIT compiler called Graal. Graal is based on OpenJDK but hasn't
been released yet.

http://openjdk.java.net/projects/graal/
  • Loading branch information
chrisseaton authored and mislav committed Feb 26, 2014
1 parent 7710db5 commit dcdccd7
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
25 changes: 22 additions & 3 deletions bin/ruby-build
Expand Up @@ -519,10 +519,29 @@ build_package_jruby() {
fix_jruby_shebangs
}

graal_architecture() {
if [ "$(uname -m)" != "x86_64" ]; then
echo "no nightly builds available" >&2
exit 1
fi

case "$(uname -s)" in
"Darwin") echo "macosx-x86_64";;
"Linux") echo "linux-x86_64";;
*)
echo "no nightly builds available" >&2
exit 1;;
esac
}

install_jruby_launcher() {
cd "${PREFIX_PATH}/bin"
{ ./ruby gem install jruby-launcher
} >&4 2>&1
# If this version of JRuby has been modified for Graal, don't overwrite the
# launcher scripts
if ! grep -q graalvm "${PREFIX_PATH}/bin/jruby"; then
cd "${PREFIX_PATH}/bin"
{ ./ruby gem install jruby-launcher
} >&4 2>&1
fi
}

fix_jruby_shebangs() {
Expand Down
1 change: 1 addition & 0 deletions share/ruby-build/jruby-9000+graal-dev
@@ -0,0 +1 @@
install_package "jruby-9000.dev" "http://lafo.ssw.uni-linz.ac.at/graalvm/jruby-dist-9000+graal-$(graal_architecture).dev-bin.tar.gz" jruby

0 comments on commit dcdccd7

Please sign in to comment.