Skip to content

Commit

Permalink
build: don't nuke /tmp contents
Browse files Browse the repository at this point in the history
The previous build script nuked /tmp contents, which caused hard to
diagnose issues in downstream projects.
  • Loading branch information
TerrorJack committed Jan 10, 2025
1 parent 1a75644 commit 0279e50
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@ apk add --no-cache \

find /usr -type f -executable -name "ld" -exec sh -c 'ln -sf /usr/bin/ld.mold {}' \;

curl -f -L --retry 5 https://github.com/microsoft/mimalloc/archive/refs/tags/v$MIMALLOC_VERSION.tar.gz | tar xz --strip-components=1
curl -f -L --retry 5 https://github.com/microsoft/mimalloc/archive/refs/tags/v$MIMALLOC_VERSION.tar.gz | tar xz

patch -p1 < mimalloc.diff
cd mimalloc-$MIMALLOC_VERSION

patch -p1 < /tmp/mimalloc.diff

cmake \
-Bout \
Expand All @@ -45,4 +47,7 @@ for libc_path in $(find /usr -name libc.a); do
mv libc.a $libc_path
done

rm -rf /tmp/*
rm -rf \
/tmp/build.sh \
/tmp/mimalloc.diff \
/tmp/mimalloc-$MIMALLOC_VERSION

0 comments on commit 0279e50

Please sign in to comment.