From 9e3c08db40b8916968b9f30096c7be3f00ce9647 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 21 Apr 2024 13:44:51 +0200 Subject: Adding upstream version 1:115.7.0. Signed-off-by: Daniel Baumann --- taskcluster/scripts/misc/build-compiler-rt-wasi.sh | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100755 taskcluster/scripts/misc/build-compiler-rt-wasi.sh (limited to 'taskcluster/scripts/misc/build-compiler-rt-wasi.sh') diff --git a/taskcluster/scripts/misc/build-compiler-rt-wasi.sh b/taskcluster/scripts/misc/build-compiler-rt-wasi.sh new file mode 100755 index 0000000000..d23e4b1e5a --- /dev/null +++ b/taskcluster/scripts/misc/build-compiler-rt-wasi.sh @@ -0,0 +1,32 @@ +#!/bin/bash +set -x -e -v + +artifact=$(basename $TOOLCHAIN_ARTIFACT) +dir=${artifact%.tar.*} + +cd $MOZ_FETCHES_DIR/wasi-sdk +LLVM_PROJ_DIR=$MOZ_FETCHES_DIR/llvm-project + +mkdir -p build/install/wasi +# The wasi-sdk build system wants to build clang itself. We trick it into +# thinking it did, and put our own clang where it would have built its own. +ln -s $MOZ_FETCHES_DIR/clang build/llvm +touch build/llvm.BUILT + +# The wasi-sdk build system wants a clang and an ar binary in +# build/install/$PREFIX/bin +ln -s $MOZ_FETCHES_DIR/clang/bin build/install/wasi/bin +ln -s llvm-ar build/install/wasi/bin/ar + +# Build compiler-rt +make \ + LLVM_PROJ_DIR=$LLVM_PROJ_DIR \ + PREFIX=/wasi \ + build/compiler-rt.BUILT \ + -j$(nproc) + +mkdir -p $dir/lib +mv build/install/wasi/lib/clang/*/lib/wasi $dir/lib +tar --zstd -cf $artifact $dir +mkdir -p $UPLOAD_DIR +mv $artifact $UPLOAD_DIR/ -- cgit v1.2.3