new file mode 100644
@@ -0,0 +1,3 @@
+# Strech LLVM 8 repos
+deb http://apt.llvm.org/stretch/ llvm-toolchain-stretch-8 main
+deb-src http://apt.llvm.org/stretch/ llvm-toolchain-stretch-8 main
@@ -5,6 +5,14 @@ LABEL maintainer.name="The Xen Project" \
ENV DEBIAN_FRONTEND=noninteractive
ENV USER root
+RUN apt-get update && \
+ apt-get --quiet --yes install \
+ wget \
+ gnupg
+
+RUN wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|apt-key add -
+COPY stretch-llvm.list /etc/apt/sources.list.d/
+
RUN mkdir /build
WORKDIR /build
@@ -39,9 +47,10 @@ RUN apt-get update && \
transfig \
pandoc \
checkpolicy \
- wget \
git \
nasm \
+ clang-8 \
+ lld-8 \
&& \
apt-get autoremove -y && \
apt-get clean && \
new file mode 100644
@@ -0,0 +1,3 @@
+# Unstable LLVM 8 repos
+deb http://apt.llvm.org/unstable/ llvm-toolchain-8 main
+deb-src http://apt.llvm.org/unstable/ llvm-toolchain-8 main
@@ -5,6 +5,14 @@ LABEL maintainer.name="The Xen Project" \
ENV DEBIAN_FRONTEND=noninteractive
ENV USER root
+RUN apt-get update && \
+ apt-get --quiet --yes install \
+ wget \
+ gnupg
+
+RUN wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|apt-key add -
+COPY unstable-llvm.list /etc/apt/sources.list.d/
+
RUN mkdir /build
WORKDIR /build
@@ -39,9 +47,10 @@ RUN apt-get update && \
transfig \
pandoc \
checkpolicy \
- wget \
git \
nasm \
+ clang-8 \
+ lld-8 \
&& \
apt-get autoremove -y && \
apt-get clean && \
@@ -26,6 +26,13 @@
CXX: clang++
clang: y
+.clang-8-tmpl:
+ variables: &clang-8
+ CC: clang-8
+ CXX: clang++-8
+ LD: lld-8
+ clang: y
+
.x86-64-build-tmpl:
<<: *build
variables:
@@ -90,6 +97,16 @@
variables:
<<: *clang
+.clang-8-x86-64-build:
+ extends: .x86-64-build
+ variables:
+ <<: *clang-8
+
+.clang-8-x86-64-build-debug:
+ extends: .x86-64-build-debug
+ variables:
+ <<: *clang-8
+
.clang-x86-32-build:
extends: .x86-32-build
variables:
@@ -219,6 +236,16 @@ debian-stretch-clang-debug:
variables:
CONTAINER: debian:stretch
+debian-stretch-clang-8:
+ extends: .clang-8-x86-64-build
+ variables:
+ CONTAINER: debian:stretch
+
+debian-stretch-clang-8-debug:
+ extends: .clang-8-x86-64-build-debug
+ variables:
+ CONTAINER: debian:stretch
+
debian-stretch-gcc:
extends: .gcc-x86-64-build
variables:
@@ -259,6 +286,16 @@ debian-unstable-clang-debug:
variables:
CONTAINER: debian:unstable
+debian-unstable-clang-8:
+ extends: .clang-8-x86-64-build
+ variables:
+ CONTAINER: debian:unstable
+
+debian-unstable-clang-8-debug:
+ extends: .clang-8-x86-64-build-debug
+ variables:
+ CONTAINER: debian:unstable
+
debian-unstable-gcc:
extends: .gcc-x86-64-build
variables:
@@ -19,7 +19,7 @@ fi
cfgargs=()
cfgargs+=("--enable-docs")
-if [[ "${CC}" == "clang" ]]; then
+if [[ "${CC}" == "clang"* ]]; then
# SeaBIOS cannot be built with clang
cfgargs+=("--with-system-seabios=/usr/share/seabios/bios.bin")
# iPXE cannot be built with clang
Using clang and lld 8 requires installing the packages from the official llvm apt repositories, so modify the Debian Docker files for stretch and unstable to add the llvm repo and install clang and lld from it. Also add some jobs to test building Xen with clang 8 and lld. Signed-off-by: Roger Pau Monné <roger.pau@citrix.com> --- NB: I'm not sure what's the proper way to test this patch. I've checked that the docker files seem to be fine for creating a docker image for stretch and unstable, but I'm unsure about how to test the changes to the gitlab. Should the new images with clang-8 and lld be pushed to the registry in order to test the gitlab CI changes? --- Cc: Doug Goldstein <cardoe@cardoe.com> Cc: Wei Liu <wl@xen.org> --- automation/build/debian/stretch-llvm.list | 3 ++ automation/build/debian/stretch.dockerfile | 11 +++++- automation/build/debian/unstable-llvm.list | 3 ++ automation/build/debian/unstable.dockerfile | 11 +++++- automation/gitlab-ci/build.yaml | 37 +++++++++++++++++++++ automation/scripts/build | 2 +- 6 files changed, 64 insertions(+), 3 deletions(-) create mode 100644 automation/build/debian/stretch-llvm.list create mode 100644 automation/build/debian/unstable-llvm.list