1
1
mirror of https://github.com/rui314/mold.git synced 2024-09-17 16:09:43 +03:00

Improve build scripts

This commit is contained in:
Rui Ueyama 2022-02-18 22:35:59 +09:00
parent b22e6f80fc
commit 0b7d210f99
2 changed files with 8 additions and 4 deletions

View File

@ -2,6 +2,7 @@
set -e
ver=$(grep '^VERSION =' $(dirname $0)/../Makefile | sed 's/.* = //')
dest=mold-$ver-ubuntu-18.04
cat <<'EOF' | docker build -t mold-build-ubuntu18 -
FROM ubuntu:18.04
@ -24,5 +25,6 @@ docker run -it --rm -v "$(pwd):/mold:Z" -u "$(id -u):$(id -g)" \
cd /tmp/mold &&
make clean &&
make -j$(nproc) CXX=clang++-14 &&
make install DESTDIR=mold-$ver-ubuntu-18.04 &&
tar czf /mold/mold-$ver-ubuntu-18.04.tar.gz mold-$ver-ubuntu-18.04"
make install PREFIX=/ DESTDIR=$dest &&
ln -sfr $dest/bin/mold $dest/libexec/mold/ld &&
tar czf /mold/$dest.tar.gz $dest"

View File

@ -2,6 +2,7 @@
set -e
ver=$(grep '^VERSION =' $(dirname $0)/../Makefile | sed 's/.* = //')
dest=mold-$ver-ubuntu-20.04
cat <<'EOF' | docker build -t mold-build-ubuntu20 -
FROM ubuntu:20.04
@ -20,5 +21,6 @@ docker run -it --rm -v "$(pwd):/mold:Z" -u "$(id -u):$(id -g)" \
cd /tmp/mold &&
make clean &&
make -j$(nproc) CXX=clang++ &&
make install DESTDIR=mold-$ver-ubuntu-20.04 &&
tar czf /mold/mold-$ver-ubuntu-20.04.tar.gz mold-$ver-ubuntu-20.04"
make install PREFIX=/ DESTDIR=$dest &&
ln -sfr $dest/bin/mold $dest/libexec/mold/ld &&
tar czf /mold/$dest.tar.gz $dest"