step7 and 8

This commit is contained in:
2024-11-06 22:48:24 +02:00
parent d942dc7337
commit 6c20b6aee5
2 changed files with 103 additions and 7 deletions

71
run
View File

@@ -89,6 +89,22 @@ BUILTIN_TYPE_=0.10.0-851-gaac2d6b56f
REMOVE_BUILTIN_TYPE=2a5e1426aa9469fadb78e837d0100d689213b034
REMOVE_BUILTIN_TYPE_=0.10.0-853-g2a5e1426aa
# commit 54160e7f6aecb4628df633ceaef4c6d956429a3d
# Author: Veikka Tuominen <git@vexu.eu>
# Date: 2022-12-21T14:33:02+02:00
#
# Sema: make overflow arithmetic builtins return tuples
BUILTINS_4TO2=54160e7f6aecb4628df633ceaef4c6d956429a3d
BUILTINS_4TO2_=0.10.0-961-g54160e7f6a
# commit 622311fb9ac7ee6d93dcb8cda4b608751f7e092a
# Author: Veikka Tuominen <git@vexu.eu>
# Date: 2022-12-21T16:40:30+02:00
#
# update uses of overflow arithmetic builtins
BUILTINS_4TO2_USES=622311fb9ac7ee6d93dcb8cda4b608751f7e092a
BUILTINS_4TO2_USES_=0.10.0-962-g622311fb9a
fullbuild() {
rm -fr build
mkdir build
@@ -238,17 +254,58 @@ step6() {
echo "zig1.wasm updated for $TO_"
}
step7() {
local FROM="$REMOVE_BUILTIN_TYPE"
local FROM_="$REMOVE_BUILTIN_TYPE_"
local TO="$BUILTINS_4TO2"
local TO_="$BUILTINS_4TO2_"
echo "Updating zig1.wasm from $FROM_ -> $TO_ in ../zig-$TO_"
rm -fr "../zig-$TO_"
git archive --prefix=zig-$TO_/ $TO | tar -C .. -x
{
pushd "../zig-$TO_"
patch -p1 <"$HERE/0.10.0-961-g54160e7f6a-CMakeLists.txt-remove-stage3.patch"
cp ../zig-$FROM_/stage1/zig1.wasm stage1/zig1.wasm
fullbuild
build/zig2 build update-zig1
popd
}
}
step8() {
local FROM="$BUILTINS_4TO2"
local FROM_="$BUILTINS_4TO2_"
local TO="$BUILTINS_4TO2_USES"
local TO_="$BUILTINS_4TO2_USES_"
echo "Updating zig1.wasm from $FROM_ -> $TO_ in ../zig-$TO_"
rm -fr "../zig-$TO_"
git archive --prefix=zig-$TO_/ $TO | tar -C .. -x
{
pushd "../zig-$TO_"
cp ../zig-$FROM_/stage1/zig1.wasm stage1/zig1.wasm
fullbuild
build/stage3/bin/zig build update-zig1
popd
}
}
if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
set -xeuo pipefail
step=${1:-step0}
step=${step#step}
# works:
if [[ "$step" -le 00 ]] ; then step0; fi
if [[ "$step" -le 10 ]] ; then step1; fi
if [[ "$step" -le 20 ]] ; then step2; fi
if [[ "$step" -le 30 ]] ; then step3; fi
if [[ "$step" -le 40 ]] ; then step4; fi
if [[ "$step" -le 50 ]] ; then step5; fi
if [[ "$step" -le 60 ]] ; then step6; fi
if [[ "$step" -le 0 ]] ; then step0; fi
if [[ "$step" -le 1 ]] ; then step1; fi
if [[ "$step" -le 2 ]] ; then step2; fi
if [[ "$step" -le 3 ]] ; then step3; fi
if [[ "$step" -le 4 ]] ; then step4; fi
if [[ "$step" -le 5 ]] ; then step5; fi
if [[ "$step" -le 6 ]] ; then step6; fi
if [[ "$step" -le 7 ]] ; then step7; fi
if [[ "$step" -le 8 ]] ; then step8; fi
fi