2019-08-10 22:32:09 +00:00
|
|
|
# This template installs LLVM (if doesn't exist in the systems)
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- bash: |
|
|
|
|
set -ex
|
|
|
|
if [ -x "`command -v llvm-config`" ]; then
|
|
|
|
echo `command -v llvm-config` `llvm-config --version` installed
|
|
|
|
else
|
|
|
|
curl -O https://releases.llvm.org/8.0.0/clang+llvm-8.0.0-x86_64-apple-darwin.tar.xz
|
|
|
|
tar xf clang+llvm-8.0.0-x86_64-apple-darwin.tar.xz
|
2019-08-10 22:48:56 +00:00
|
|
|
export LLVM_PATH="`pwd`/clang+llvm-8.0.0-x86_64-apple-darwin/"
|
|
|
|
echo "##vso[task.prependpath]$LLVM_PATH/bin"
|
|
|
|
echo "##vso[task.setvariable variable=LLVM_SYS_80_PREFIX]$LLVM_PATH"
|
2019-08-10 22:32:09 +00:00
|
|
|
fi
|
|
|
|
displayName: "Install LLVM (macOS)"
|
|
|
|
condition: eq(variables['Agent.OS'], 'Darwin')
|
|
|
|
|
|
|
|
- bash: |
|
|
|
|
set -ex
|
|
|
|
if [ -x "`command -v llvm-config`" ]; then
|
|
|
|
echo `command -v llvm-config` `llvm-config --version` installed
|
|
|
|
else
|
|
|
|
curl -O https://releases.llvm.org/8.0.0/clang+llvm-8.0.0-x86_64-linux-gnu-ubuntu-16.04.tar.xz
|
|
|
|
tar xf clang+llvm-8.0.0-x86_64-linux-gnu-ubuntu-16.04.tar.xz
|
2019-08-10 22:48:56 +00:00
|
|
|
export LLVM_PATH="`pwd`/clang+llvm-8.0.0-x86_64-linux-gnu-ubuntu-16.04/"
|
|
|
|
echo "##vso[task.prependpath]$LLVM_PATH/bin"
|
|
|
|
echo "##vso[task.setvariable variable=LLVM_SYS_80_PREFIX]$LLVM_PATH"
|
2019-08-10 22:32:09 +00:00
|
|
|
fi
|
|
|
|
displayName: "Install LLVM (Linux)"
|
|
|
|
condition: eq(variables['Agent.OS'], 'Linux')
|
|
|
|
|
|
|
|
- bash: |
|
|
|
|
set -ex
|
|
|
|
if [ -x "`command -v llvm-config`" ]; then
|
|
|
|
echo `command -v cmake` `llvm-config --version` installed
|
|
|
|
else
|
2019-09-01 17:28:49 +00:00
|
|
|
mkdir C:\projects\deps
|
|
|
|
cd C:\projects\deps
|
2019-08-10 23:17:58 +00:00
|
|
|
curl -OL https://github.com/wasmerio/windows-llvm-build/releases/download/v8.0.0/llvm-8.0.0-install.zip
|
2019-08-10 22:48:56 +00:00
|
|
|
7z x llvm-8.0.0-install.zip
|
2019-09-01 17:35:50 +00:00
|
|
|
echo "##vso[task.prependpath]/c/projects/deps/llvm-8.0.0-install/bin"
|
|
|
|
echo "##vso[task.setvariable variable=LLVM_SYS_80_PREFIX]C:\\projects\\deps\\llvm-8.0.0-install"
|
2019-08-10 22:32:09 +00:00
|
|
|
fi
|
|
|
|
displayName: "Install LLVM (Windows)"
|
|
|
|
condition: eq(variables['Agent.OS'], 'Windows_NT')
|
|
|
|
|
|
|
|
- bash: |
|
|
|
|
set -ex
|
2019-08-25 08:03:54 +00:00
|
|
|
env
|
2019-08-10 22:32:09 +00:00
|
|
|
llvm-config --version
|
|
|
|
displayName: LLVM version
|