From 739379e03c4031d9652549aa5cc5c990bafa809e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Wed, 6 Nov 2024 14:11:10 +0200 Subject: [PATCH] more steps --- run | 44 ++++++++++++++++++++++++++++++++++---------- 1 file changed, 34 insertions(+), 10 deletions(-) diff --git a/run b/run index 14e1d15..5f99ce4 100755 --- a/run +++ b/run @@ -52,12 +52,19 @@ BOUNDFN=0.10.0-675-g9d93b2ccf1 # 1 file changed, 0 insertions(+), 0 deletions(-) C_AARCH64=0.10.0-722-gd10fd78d46 -# commit 51ed5416ab2969a366c8c6bdc487f357bad267c3 +# commit 7b2a936173165002105ba5e76bed69654e132fea # Author: Veikka Tuominen -# Date: 2022-12-12T15:40:18+02:00 +# Date: 2022-12-12T15:32:37+02:00 # -# update zig1.wasm to `@call` changes -CALL_CHANGES=0.10.0-749-g51ed5416ab +# remove `stack` option from `@call` +CALL_OPTIONS=0.10.0-747-g7b2a936173-CallOptions.patch + +# commit 08b2d491bcd8c79c68495267cc71967661caea1e +# Author: Veikka Tuominen +# Date: 2022-12-12T15:32:37+02:00 +# +# update usages of `@call` +CALL_USAGES=0.10.0-748-g08b2d491bc # commit 2a5e1426aa9469fadb78e837d0100d689213b034 # Author: Veikka Tuominen @@ -156,9 +163,9 @@ step20() { echo "zig1.wasm.zst was built for C-aarch64 backend" } -generic() { - local FROM="$1" - local TO="$2" +step30() { + local FROM="$C_AARCH64" + local TO="$CALL_OPTIONS" echo "Updating zig1.wasm from $FROM -> $TO in ../zig-$TO" rm -fr "../zig-$TO" @@ -166,7 +173,24 @@ generic() { { pushd "../zig-$TO" - cp "../zig-$FROM/stage1/zig1.wasm" stage1/ + patch -p1 <"$HERE0.10.0-747-g7b2a936173-CallOptions.patch" + "../zig-$FROM/build/stage3/bin/zig" build --zig-lib-dir lib update-zig1 + popd + } + echo "zig1.wasm updated for $TO" +} + +step40() { + echo "Updating zig1.wasm from $FROM -> $TO in ../zig-$TO" + + local FROM="$CALL_OPTIONS" + local TO="$CALL_USAGES" + rm -fr "../zig-$TO" + git archive --prefix=zig-$TO/ "$TO" | tar -C .. -x --exclude="stage1/zig1.wasm*" + + { + pushd "../zig-$TO" + cp ../zig-$FROM/stage1/zig1.wasm stage1/zig1.wasm mkdir build { pushd build @@ -185,6 +209,6 @@ if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then step00 step10 step20 - #generic "$C_AARCH64" "$CALL_CHANGES" # https://ziggit.dev/t/building-self-hosted-from-the-original-c-implementation/6607/10?u=motiejus - #generic "$CALL_CHANGES" "$BUILTIN_TYPE" # later + step30 + step40 fi