Merge pull request #627 from al-cheb/al-cheb/fix_clang_8_installation

Ubuntu 16.04/18.04 image generation failed while installing clang-8
This commit is contained in:
Maxim Lobanov
2020-03-26 09:58:59 +03:00
committed by GitHub

View File

@@ -12,13 +12,11 @@ function InstallClang {
version=$1 version=$1
echo "Installing clang-$version..." echo "Installing clang-$version..."
# Clang 6.0 is not supported by automatic installation script (`llvm.sh`) if [[ $version =~ 9 ]]; then
# Thus we have to install it explicitly
if [[ $version == 6* ]]; then
apt-get install -y "clang-$version" "lldb-$version" "lld-$version"
else
./llvm.sh $version ./llvm.sh $version
apt-get install -y "clang-format-$version" apt-get install -y "clang-format-$version"
else
apt-get install -y "clang-$version" "lldb-$version" "lld-$version" "clang-format-$version"
fi fi
# Run tests to determine that the software installed as expected # Run tests to determine that the software installed as expected
@@ -35,11 +33,6 @@ function InstallClang {
DocumentInstalledItem "Clang $version ($(clang-$version --version | head -n 1 | cut -d ' ' -f 3 | cut -d '-' -f 1))" DocumentInstalledItem "Clang $version ($(clang-$version --version | head -n 1 | cut -d ' ' -f 3 | cut -d '-' -f 1))"
} }
# Install Clang compiler
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
apt-add-repository "deb http://apt.llvm.org/$(lsb_release -cs)/ llvm-toolchain-$(lsb_release -cs)-6.0 main"
apt-get update -y
# Download script for automatic installation # Download script for automatic installation
wget https://apt.llvm.org/llvm.sh wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh chmod +x llvm.sh