forked from ponylang/ponyc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis_install.bash
35 lines (26 loc) · 1.04 KB
/
.travis_install.bash
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#! /bin/bash
set -o errexit
set -o nounset
download_llvm(){
echo "Downloading and installing the LLVM specified by envvars..."
git lfs clone -I "clang+llvm-${LLVM_VERSION}-x86_64-linux-gnu-debian8.tar.xz" https://github.com/ponylang/ponyc-llvm-dependencies.git
pushd ponyc-llvm-dependencies
tar -xf "clang+llvm-${LLVM_VERSION}-x86_64-linux-gnu-debian8.tar.xz"
pushd clang+llvm* && sudo mkdir /tmp/llvm && sudo cp -r ./* /tmp/llvm/
sudo ln -s "/tmp/llvm/bin/llvm-config" "/usr/local/bin/${LLVM_CONFIG}"
popd
popd
}
download_pcre(){
echo "Downloading and building PCRE2..."
git lfs clone -I "pcre2-10.21.tar.bz2" https://github.com/ponylang/ponyc-llvm-dependencies.git pcre-dependencies
pushd pcre-dependencies
tar -xjf pcre2-10.21.tar.bz2
pushd pcre2-10.21 && ./configure --prefix=/usr && make && sudo make install
popd
popd
}
set_linux_compiler(){
echo "Setting $ICC1 and $ICXX1 as default compiler"
sudo update-alternatives --install /usr/bin/gcc gcc "/usr/bin/$ICC1" 60 --slave /usr/bin/g++ g++ "/usr/bin/$ICXX1"
}