Commit dcdccd76 authored by Chris Seaton's avatar Chris Seaton Committed by Mislav Marohnić
Browse files

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/
parent 7710db57
Loading
Loading
Loading
Loading
+22 −3
Original line number Diff line number Diff line
@@ -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() {
  # 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() {
+1 −0
Original line number Diff line number Diff line
install_package "jruby-9000.dev" "http://lafo.ssw.uni-linz.ac.at/graalvm/jruby-dist-9000+graal-$(graal_architecture).dev-bin.tar.gz" jruby