From patchwork Fri May 31 08:17:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Roger_Pau_Monn=C3=A9?= X-Patchwork-Id: 10969757 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BB718912 for ; Fri, 31 May 2019 08:19:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AA02128A63 for ; Fri, 31 May 2019 08:19:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9D01328C83; Fri, 31 May 2019 08:19:20 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 00A9828A63 for ; Fri, 31 May 2019 08:19:19 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hWcjA-0004c9-MP; Fri, 31 May 2019 08:17:28 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hWcj9-0004c3-HA for xen-devel@lists.xenproject.org; Fri, 31 May 2019 08:17:27 +0000 X-Inumbo-ID: 82816efc-837c-11e9-a3d1-37a3a72d85b5 Received: from esa2.hc3370-68.iphmx.com (unknown [216.71.145.153]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 82816efc-837c-11e9-a3d1-37a3a72d85b5; Fri, 31 May 2019 08:17:20 +0000 (UTC) Authentication-Results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=roger.pau@citrix.com; spf=Pass smtp.mailfrom=roger.pau@citrix.com; spf=None smtp.helo=postmaster@MIAPEX02MSOL01.citrite.net Received-SPF: None (esa2.hc3370-68.iphmx.com: no sender authenticity information available from domain of roger.pau@citrix.com) identity=pra; client-ip=23.29.105.83; receiver=esa2.hc3370-68.iphmx.com; envelope-from="roger.pau@citrix.com"; x-sender="roger.pau@citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa2.hc3370-68.iphmx.com: domain of roger.pau@citrix.com designates 23.29.105.83 as permitted sender) identity=mailfrom; client-ip=23.29.105.83; receiver=esa2.hc3370-68.iphmx.com; envelope-from="roger.pau@citrix.com"; x-sender="roger.pau@citrix.com"; x-conformance=sidf_compatible; x-record-type="v=spf1"; x-record-text="v=spf1 ip4:209.167.231.154 ip4:178.63.86.133 ip4:195.66.111.40/30 ip4:85.115.9.32/28 ip4:199.102.83.4 ip4:192.28.146.160 ip4:192.28.146.107 ip4:216.52.6.88 ip4:216.52.6.188 ip4:23.29.105.83 ip4:162.221.156.50 ~all" Received-SPF: None (esa2.hc3370-68.iphmx.com: no sender authenticity information available from domain of postmaster@MIAPEX02MSOL01.citrite.net) identity=helo; client-ip=23.29.105.83; receiver=esa2.hc3370-68.iphmx.com; envelope-from="roger.pau@citrix.com"; x-sender="postmaster@MIAPEX02MSOL01.citrite.net"; x-conformance=sidf_compatible IronPort-SDR: ortW6Jq7YIZQwC3mArvOUVcHH1o3kSpPkjfMMKbYbhWW/CCc6ax6yDMMPGsv1m5b+uispgG6FQ D8qYLNn4fw6tbG8r6NXMLemLnszYg91sAAw5bVu5SnrXjpSnM0GCTXyxmJsJGCg4a/nqDEoQIH C5OTUx4imUO5zFkGsnws2e1HjJXmBNKb2ofI3A92KKMh19KP54XN0yMmf41CJzDTz361PE/v5k bFcQqqg/IUWkfh4mZP3BrC4UeTz4Q0Rc3277Rr5cC7M43qnOD8rjizYPZU2EllCrGh60vojvej H4s= X-SBRS: 2.7 X-MesageID: 1146979 X-Ironport-Server: esa2.hc3370-68.iphmx.com X-Remote-IP: 23.29.105.83 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.60,534,1549947600"; d="scan'208";a="1146979" From: Roger Pau Monne To: Date: Fri, 31 May 2019 10:17:13 +0200 Message-ID: <20190531081713.55596-1-roger.pau@citrix.com> X-Mailer: git-send-email 2.20.1 (Apple Git-117) MIME-Version: 1.0 Subject: [Xen-devel] [PATCH v2] automation: add clang and lld 8 tests to gitlab X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Doug Goldstein , Wei Liu , Roger Pau Monne Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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é Acked-by: Wei Liu Acked-by: Doug Goldstein --- I've tested this manually by doing: # make -C automation/build debian/stretch # CONTAINER_NO_PULL=1 ./automation/scripts/containerize << END ./configure --with-system-seabios=/usr/share/seabios/bios.bin \ --with-system-ipxe=/usr/lib/ipxe/ipxe.pxe --disable-stubdom make -j8 dist CC=clang-8 CXX=clang-8 LD=ld.lld-8 clang=y END --- Cc: Doug Goldstein Cc: Wei Liu --- Changes since v1: - Use ld.lld-8 instead of lld-8, as that's the recommended way reported by lld-8. --- 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 diff --git a/automation/build/debian/stretch-llvm.list b/automation/build/debian/stretch-llvm.list new file mode 100644 index 0000000000..09fe843fb2 --- /dev/null +++ b/automation/build/debian/stretch-llvm.list @@ -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 diff --git a/automation/build/debian/stretch.dockerfile b/automation/build/debian/stretch.dockerfile index daf8c9d384..189dff3275 100644 --- a/automation/build/debian/stretch.dockerfile +++ b/automation/build/debian/stretch.dockerfile @@ -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 && \ diff --git a/automation/build/debian/unstable-llvm.list b/automation/build/debian/unstable-llvm.list new file mode 100644 index 0000000000..dc119fa0b4 --- /dev/null +++ b/automation/build/debian/unstable-llvm.list @@ -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 diff --git a/automation/build/debian/unstable.dockerfile b/automation/build/debian/unstable.dockerfile index 7762cf97ab..48d5f7a863 100644 --- a/automation/build/debian/unstable.dockerfile +++ b/automation/build/debian/unstable.dockerfile @@ -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 && \ diff --git a/automation/gitlab-ci/build.yaml b/automation/gitlab-ci/build.yaml index dd5722a5bb..17de3b1848 100644 --- a/automation/gitlab-ci/build.yaml +++ b/automation/gitlab-ci/build.yaml @@ -26,6 +26,13 @@ CXX: clang++ clang: y +.clang-8-tmpl: + variables: &clang-8 + CC: clang-8 + CXX: clang++-8 + LD: 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: diff --git a/automation/scripts/build b/automation/scripts/build index 8a57e097a9..83c44e6ce7 100755 --- a/automation/scripts/build +++ b/automation/scripts/build @@ -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