Commit 0ec626bc authored by Benoit Daloze's avatar Benoit Daloze
Browse files

Remove early check for LLVM when installing TruffleRuby

* TruffleRuby already checks for LLVM itself when it needs it and
  looks up more paths to find the LLVM executables clang and opt.
* See https://github.com/oracle/truffleruby/issues/1386.
parent ad8f3a47
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -729,14 +729,6 @@ fix_jruby_shebangs() {
}

build_package_truffleruby() {
  if ! opt --version &>/dev/null; then
    echo ""
    echo "TruffleRuby requires LLVM to be installed to run native extensions."
    echo "For more details and for setup instructions for your system, please see:"
    echo "https://github.com/oracle/truffleruby/blob/master/doc/user/installing-llvm.md"
    exit 1
  fi

  build_package_copy

  cd "${PREFIX_PATH}"
+0 −15
Original line number Diff line number Diff line
@@ -639,7 +639,6 @@ DEF
echo Running post-install hook
OUT
  cached_tarball "truffleruby-test" bin/truffleruby
  stub opt true

  run_inline_definition <<DEF
install_package "truffleruby-test" "URL" truffleruby
@@ -648,20 +647,6 @@ DEF
  assert_output_contains "Running post-install hook"
}

@test "TruffleRuby LLVM missing" {
  executable "${RUBY_BUILD_CACHE_PATH}/truffleruby-test/lib/truffle/post_install_hook.sh" <<OUT
echo Running post-install hook
OUT
  cached_tarball "truffleruby-test" bin/truffleruby
  stub opt false

  run_inline_definition <<DEF
install_package "truffleruby-test" "URL" truffleruby
DEF
  assert_failure
  assert_output_contains "TruffleRuby requires LLVM to be installed to run native extensions."
}

@test "non-writable TMPDIR aborts build" {
  export TMPDIR="${TMP}/build"
  mkdir -p "$TMPDIR"