Commit 3b6f96df authored by Mislav Marohnić's avatar Mislav Marohnić
Browse files

Lookup LLVM 3.5 from Homebrew on `require_llvm` on OS X

Prior to this we tried to use pre-built LLVM binaries since Yosemite,
but starting with Rubinius 2.3.0 this is no longer a feature of its
build system. Instead, look for "llvm" Homebrew package and suggest
installing it if it's missing.
parent d859ee12
Loading
Loading
Loading
Loading
+22 −1
Original line number Diff line number Diff line
@@ -798,7 +798,28 @@ require_llvm() {
  local llvm_version="$1"
  if [ "$(uname -s)" = "Darwin" ] && [ "$(osx_version)" -ge 1010 ]; then
    if [[ "$RUBY_CONFIGURE_OPTS" != *--llvm-* ]]; then
      if [ "$llvm_version" = "3.2" ]; then
        package_option ruby configure --prebuilt-name="llvm-3.2-x86_64-apple-darwin13.tar.bz2"
      else
        local llvm_prefix="$(brew --prefix llvm 2>/dev/null || true)"
        local llvm_config="${llvm_prefix}/bin/llvm-config"
        if [ -x "$llvm_config" ]; then
          package_option ruby configure --llvm-config="$llvm_config"
        else
          { echo
            colorize 1 "ERROR"
            echo ": Rubinius will not be able to compile using Apple's LLVM-based "
            echo "build tools on OS X. You will need to install LLVM 3.5 first."
            echo
            colorize 1 "TO FIX THE PROBLEM"
            echo ": Install Homebrew's llvm package with this"
            echo -n "command: "
            colorize 4 "brew install llvm"
            echo
          } >&3
          return 1
        fi
      fi
    fi
  fi
}
+1 −1
Original line number Diff line number Diff line
require_llvm 3.4.2
require_llvm 3.2
install_package "yaml-0.1.6" "http://pyyaml.org/download/libyaml/yaml-0.1.6.tar.gz#7da6971b4bd08a986dd2a61353bc422362bd0edcc67d7ebaac68c95f74182749"
install_git "rubinius-2.0.0-dev" "https://github.com/rubinius/rubinius.git" "master" rbx