Skip to content

Commit ba043dd

Browse files
committed
Revert "Docker: Use LLVM 16 toolchain and support arm64 crosscompile (#1019)"
This reverts commit 4e6afcb. Issues with non-PIC code in some other repos. Need to revert this until I can figure out how to fix it. We should be versioning Docker images anyway so that this doesn't happen again
1 parent 4e6afcb commit ba043dd

File tree

3 files changed

+8
-59
lines changed

3 files changed

+8
-59
lines changed

docker/.dockerignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
*
2-
!update_llvm_ver_alternatives.sh

docker/Dockerfile.ubuntu.vcpkg

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
ARG DISTRO_VERSION=focal
2-
ARG LLVM_VERSION=16
2+
ARG LLVM_VERSION=14
33

44
ARG BUILD_BASE=ubuntu:${DISTRO_VERSION}
55
FROM ${BUILD_BASE} as base
66
ARG DISTRO_VERSION
77
ARG LLVM_VERSION
88

9-
COPY update_llvm_ver_alternatives.sh /
10-
119
# All build dependencies for vcpkg packages
1210
# First row is build dependencies for lifting tools
1311
# Second row is toolchain and build programs
@@ -17,26 +15,18 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
1715
apt-get update && apt-get install --yes apt-utils && apt-get upgrade --yes && \
1816
apt-get install --yes --no-install-recommends apt-transport-https software-properties-common gnupg ca-certificates wget && \
1917
apt-add-repository ppa:git-core/ppa --yes && \
20-
\
2118
wget "https://github.com/Kitware/CMake/releases/download/v3.22.1/cmake-3.22.1-linux-$(uname -m).sh" && \
2219
/bin/bash cmake-*.sh --skip-license --prefix=/usr/local && rm cmake-*.sh && \
23-
\
24-
wget https://apt.llvm.org/llvm.sh && \
25-
chmod +x llvm.sh && \
26-
./llvm.sh ${LLVM_VERSION} clang lld && \
27-
/update_llvm_ver_alternatives.sh ${LLVM_VERSION} 1000 && \
28-
update-alternatives --install "/usr/bin/ld" "ld" "/usr/bin/ld.lld" 20 && \
29-
update-alternatives --install "/usr/bin/ld" "ld" "/usr/bin/ld.bfd" 10 && \
30-
\
20+
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - && \
21+
echo "deb http://apt.llvm.org/${DISTRO_VERSION}/ llvm-toolchain-${DISTRO_VERSION}-${LLVM_VERSION} main" >> /etc/apt/sources.list && \
22+
echo "deb-src http://apt.llvm.org/${DISTRO_VERSION}/ llvm-toolchain-${DISTRO_VERSION}-${LLVM_VERSION} main" >> /etc/apt/sources.list && \
3123
apt-get update && apt-get upgrade --yes && \
3224
apt-get install --yes --no-install-recommends \
25+
"$( [ "$(uname -m)" != "aarch64" ] && echo "g++-multilib")" \
26+
"$( [ "$(uname -m)" = "aarch64" ] && echo "libstdc++-*-dev:armhf")" \
3327
libtinfo-dev libzstd-dev python3-pip python3-setuptools python-setuptools \
34-
build-essential binutils-multiarch g++ gcc ninja-build \
28+
build-essential g++ gcc clang lld clang-${LLVM_VERSION} lld-${LLVM_VERSION} ninja-build \
3529
pixz xz-utils make rpm curl unzip tar git zip python3 pkg-config && \
36-
apt-get install --yes --no-install-recommends \
37-
"$( [ "$(uname -m)" = "x86_64" ] && echo "g++-multilib")" \
38-
"$( [ "$(uname -m)" = "x86_64" ] && echo "libstdc++-$(gcc -dumpversion | cut -f1 -d.)-dev-arm64-cross")" \
39-
"$( [ "$(uname -m)" = "aarch64" ] && echo "libstdc++-*-dev:armhf")" && \
4030
apt-get clean --yes && \
4131
rm -rf /var/lib/apt/lists/* && \
4232
\
@@ -47,6 +37,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
4737
cmake --build build --target install && \
4838
cd .. && rm -rf ccache-ccache-*
4939

40+
# Default to system clang because things will break if mixing objects compiled with system clang and clang-14
5041
ENV CC=/usr/bin/clang \
5142
CXX=/usr/bin/clang++
5243

docker/update_llvm_ver_alternatives.sh

Lines changed: 0 additions & 41 deletions
This file was deleted.

0 commit comments

Comments
 (0)