From 0bc04914ab1429003703d5320e59471ce5a5a1ae Mon Sep 17 00:00:00 2001 From: Ricky Stewart Date: Tue, 5 Nov 2019 16:30:24 +0000 Subject: [PATCH] Bug 1582195 - Provide a job to build lucetc r=froydnj Differential Revision: https://phabricator.services.mozilla.com/D51716 --HG-- extra : moz-landing-system : lando --- taskcluster/ci/fetch/toolchains.yml | 7 +++++++ taskcluster/ci/toolchain/misc.yml | 16 ++++++++++++++++ taskcluster/scripts/misc/build-lucetc.sh | 16 ++++++++++++++++ 3 files changed, 39 insertions(+) create mode 100755 taskcluster/scripts/misc/build-lucetc.sh diff --git a/taskcluster/ci/fetch/toolchains.yml b/taskcluster/ci/fetch/toolchains.yml index e03bd1b4e608..6ef689b6c15d 100644 --- a/taskcluster/ci/fetch/toolchains.yml +++ b/taskcluster/ci/fetch/toolchains.yml @@ -435,3 +435,10 @@ cmake: artifact-name: cmake.tar.zst strip-components: 1 add-prefix: cmake/ + +lucetc-source: + description: lucetc source code + fetch: + type: git + repo: https://github.com/PLSysSec/lucet_sandbox_compiler/ + revision: 5c22392b5b1aaa60e915c75e92b57391e1e61e6d diff --git a/taskcluster/ci/toolchain/misc.yml b/taskcluster/ci/toolchain/misc.yml index b06ffe8327bf..c68df471bba7 100644 --- a/taskcluster/ci/toolchain/misc.yml +++ b/taskcluster/ci/toolchain/misc.yml @@ -175,3 +175,19 @@ wrench-deps: - android-rs-glue toolchain: - linux64-rust-1.37 # whatever m-c is built with + +lucetc: + description: "lucetc build process" + treeherder: + symbol: TL(lucetc) + run: + script: build-lucetc.sh + toolchain-artifact: public/build/lucetc.tar.xz + fetches: + fetch: + - cmake + - lucetc-source + toolchain: + - linux64-binutils + - linux64-clang + - linux64-rust diff --git a/taskcluster/scripts/misc/build-lucetc.sh b/taskcluster/scripts/misc/build-lucetc.sh new file mode 100755 index 000000000000..8760e91e0187 --- /dev/null +++ b/taskcluster/scripts/misc/build-lucetc.sh @@ -0,0 +1,16 @@ +#!/bin/bash +set -x -e -v + +cd $MOZ_FETCHES_DIR/lucet_sandbox_compiler + +export PATH=$MOZ_FETCHES_DIR/binutils/bin:$MOZ_FETCHES_DIR/clang/bin:$PATH:$MOZ_FETCHES_DIR/rustc/bin:$MOZ_FETCHES_DIR/cmake/bin +export CC=$MOZ_FETCHES_DIR/clang/bin/clang +export CFLAGS="-L$MOZ_FETCHES_DIR/clang/lib" +export CXXFLAGS=$CFLAGS +export CXX=$MOZ_FETCHES_DIR/clang/bin/clang++ +export AR=$MOZ_FETCHES_DIR/clang/bin/llvm-ar +export RUSTFLAGS="-C linker=$CXX -C link-arg=$CXXFLAGS" + +make build +mkdir -p $UPLOAD_DIR +tar --xz -cf $UPLOAD_DIR/lucetc.tar.xz target/release/lucetc