Skip to content

Commit 164f151

Browse files
committed
fix build
1 parent 4688ecd commit 164f151

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

ci/merge-artifacts.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,28 @@ make_deb() {
5656

5757
for build in dist-*; do
5858
toolchain=`ls $build/wasi-toolchain-*`
59+
if [ -f $build/libclang_rt* ]; then
60+
compiler_rt=`ls $build/libclang_rt*`
61+
else
62+
compiler_rt=`ls dist-x86_64-linux/libclang_rt*`
63+
fi
5964
sdk_dir=`basename $toolchain | sed 's/.tar.gz//' | sed s/toolchain/sdk/`
6065
mkdir dist/$sdk_dir
6166
tar xf $toolchain -C dist/$sdk_dir --strip-components 1
6267
tar czf dist/$sdk_dir.tar.gz -C dist $sdk_dir
68+
69+
# Setup the compiler-rt library for all targets.
70+
rtlibdir=$(dirname $(find dist/$sdk_dir/lib -name include))/lib
71+
mkdir -p $rtlibdir
72+
tar xf $compiler_rt -C $rtlibdir --strip-components 1
73+
6374
if echo $build | grep -q linux; then
6475
make_deb $build dist/$sdk_dir
6576
fi
6677
rm -rf dist/$sdk_dir
6778
done
79+
80+
# In addition to `wasi-sdk-*` also preserve artifacts for just compiler-rt.
81+
if [ -d dist-x86_64-linux ]; then
82+
cp dist-x86_64-linux/libclang_rt* dist
83+
fi

0 commit comments

Comments
 (0)