ray/ci/travis/install-toolchains.sh
mehrdadn e09f63ad65
Fix build errors and add more targets to Windows builds (#6811)
* Fix common.fbs rename (due to apache/arrow/commit/bef9a1c251397311a6415d3dc362ef419d154caa)

* Add missing COPTS

* Use socketpair(AF_INET) if boost::asio::local is unavailable (e.g. on Windows)

* Fix compile bug in service_based_gcs_client_test.cc (fix build breakage in #6686)

* Work around googletest/gmock inability to specify override to avoid -Werror,-Winconsistent-missing-override

* Fix missing override on IsPlasmaBuffer()

* Fix missing libraries for streaming

* Factor out install-toolchains.sh

* Put some Bazel flags into .bazelrc

* Fix jni_md.h missing inclusion

* Add ~/bin to PATH for Bazel

* Change echo $$(date) > $@ to date > $@

* Fix lots of unquoted paths

* Add system() call checks for Windows

Co-authored-by: GitHub Web Flow <noreply@github.com>
2020-02-11 16:49:33 -08:00

28 lines
973 B
Bash
Executable file

#!/usr/bin/env bash
set -euo pipefail
install_clang() {
if [ "${OSTYPE}" = "msys" ]; then
export MSYS2_ARG_CONV_EXCL="*" # Don't let MSYS2 attempt to auto-translate arguments that look like paths
# Ideally we should be able to use the Chocolatey package manager:
# choco install --no-progress llvm
# However, it frequently gives HTTP 503 errors, so we just download and install manually.
urldir="https://releases.llvm.org"
arch=64
if [ "${HOSTTYPE}" = "${HOSTTYPE%64}" ]; then arch=32; fi
local version
version="${LLVM_VERSION_WINDOWS}"
target="./LLVM-${version}-win${arch}.exe"
curl -s -L -R -o "${target}" "http://releases.llvm.org/${version}/${target##*/}"
chmod +x "${target}"
"${target}" /S
rm -f -- "${target}"
elif 1>&- command -v pacman; then
sudo pacman -S --needed --noconfirm --noprogressbar clang
elif 1>&- command -v apt-get; then
sudo apt-get -q -y install clang
fi
}
install_"$@"