diff --git a/run b/run index bd833ab..7bf7339 100755 --- a/run +++ b/run @@ -2,109 +2,6 @@ HERE=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd) -# commit e7d28344fa3ee81d6ad7ca5ce1f83d50d8502118 -# Merge: 817cf6a82e 20d86d9c63 -# Author: Andrew Kelley -# Date: 2022-12-07T01:52:39+02:00 -# -# Merge pull request #13560 from ziglang/wasi-bootstrap -# -# Nuke the C++ implementation of Zig from orbit using WASI -MERGE_WASI_BOOTSTRAP=e7d28344fa3ee81d6ad7ca5ce1f83d50d8502118 -#MERGE_WASI_BOOTSTRAP_=0.10.0-610-ge7d28344fa - -# commit 3ba916584db5485c38ebf2390e8d22bc6d81bf8e -# Author: Andrew Kelley -# Date: 2022-11-05T03:47:19+02:00 -# -# actually remove stage1 -REMOVE_STAGE1=3ba916584db5485c38ebf2390e8d22bc6d81bf8e -#REMOVE_STAGE1_=0.10.0-542-g3ba916584d - -# commit 28514476ef8c824c3d189d98f23d0f8d23e496ea -# Author: Andrew Kelley -# Date: 2022-11-01T05:29:55+02:00 -# -# remove `-fstage1` option -# -# After this commit, the self-hosted compiler does not offer the option to -# use stage1 as a backend anymore. -REMOVE_FSTAGE1=28514476ef8c824c3d189d98f23d0f8d23e496ea -#REMOVE_FSTAGE1_=0.10.0-539-g28514476ef - -# commit 9d93b2ccf11f584320a2c5209dd2d94705167695 -# Author: Veikka Tuominen -# Date: 2022-12-08T19:52:05+02:00 -# -# Eliminate `BoundFn` type from the language -# -# Closes #9484 -BOUNDFN=9d93b2ccf11f584320a2c5209dd2d94705167695 -BOUNDFN_=0.10.0-675-g9d93b2ccf1 - -# commit d10fd78d4615f329141f5c19f893039d56aff425 -# Author: Andrew Kelley -# Date: 2022-12-10T21:54:24+02:00 -# -# update zig1.wasm -# -# This includes the latest changes from master branch with fixes to the C -# backend that affect aarch64-windows which are necessary to build from -# source on this target. -# -# stage1/zig1.wasm | Bin 2315523 -> 2315899 bytes -# 1 file changed, 0 insertions(+), 0 deletions(-) -C_AARCH64=d10fd78d4615f329141f5c19f893039d56aff425 -C_AARCH64_=0.10.0-722-gd10fd78d46 - -# commit 7b2a936173165002105ba5e76bed69654e132fea -# Author: Veikka Tuominen -# Date: 2022-12-12T15:32:37+02:00 -# -# remove `stack` option from `@call` -CALL_OPTIONS=7b2a936173165002105ba5e76bed69654e132fea -CALL_OPTIONS_=0.10.0-747-g7b2a936173 - -# commit 08b2d491bcd8c79c68495267cc71967661caea1e -# Author: Veikka Tuominen -# Date: 2022-12-12T15:32:37+02:00 -# -# update usages of `@call` -CALL_USAGES=08b2d491bcd8c79c68495267cc71967661caea1e -CALL_USAGES_=0.10.0-748-g08b2d491bc - -# commit 35184bff75420f405cb703c9cf86b196843b9a94 (HEAD) -# Author: r00ster91 -# Date: 2022-12-13T23:30:06+02:00 -# -# std.builtin: rename Type.UnionField and Type.StructField's field_type to type -BUILTIN_TYPE=aac2d6b56f32134ea32fb3d984e3fcdfddd8aaf6 -BUILTIN_TYPE_=0.10.0-851-gaac2d6b56f - -# commit 2a5e1426aa9469fadb78e837d0100d689213b034 -# Author: Veikka Tuominen -# Date: 2022-12-16T19:44:25+02:00 -# -# update zig1.wasm to builtin.Type field changes -REMOVE_BUILTIN_TYPE=2a5e1426aa9469fadb78e837d0100d689213b034 -REMOVE_BUILTIN_TYPE_=0.10.0-853-g2a5e1426aa - -# commit 54160e7f6aecb4628df633ceaef4c6d956429a3d -# Author: Veikka Tuominen -# 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 -# 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 @@ -114,18 +11,44 @@ fullbuild() { popd } +# commit e7d28344fa3ee81d6ad7ca5ce1f83d50d8502118 +# Merge: 817cf6a82e 20d86d9c63 +# Author: Andrew Kelley +# Date: 2022-12-07T01:52:39+02:00 +# +# Merge pull request #13560 from ziglang/wasi-bootstrap +# +# Nuke the C++ implementation of Zig from orbit using WASI +STEP00_A=e7d28344fa3ee81d6ad7ca5ce1f83d50d8502118 + +# commit 3ba916584db5485c38ebf2390e8d22bc6d81bf8e +# Author: Andrew Kelley +# Date: 2022-11-05T03:47:19+02:00 +# +# actually remove stage1 +STEP00_B=3ba916584db5485c38ebf2390e8d22bc6d81bf8e + +# commit 28514476ef8c824c3d189d98f23d0f8d23e496ea +# Author: Andrew Kelley +# Date: 2022-11-01T05:29:55+02:00 +# +# remove `-fstage1` option +# +# After this commit, the self-hosted compiler does not offer the option to +# use stage1 as a backend anymore. +STEP00_C=28514476ef8c824c3d189d98f23d0f8d23e496ea step00() { - git checkout $MERGE_WASI_BOOTSTRAP + git checkout $STEP00_A - git revert --no-edit $REMOVE_STAGE1 + git revert --no-edit $STEP00_B - git revert --no-edit -X theirs $REMOVE_FSTAGE1 + git revert --no-edit -X theirs $STEP00_C git mv stage1/config.zig.in src sed -i '/have_stage1/ s/false/true/' src/config.zig.in - git checkout $REMOVE_FSTAGE1~1 build.zig CMakeLists.txt + git checkout $STEP00_C~1 build.zig CMakeLists.txt echo "Building the C++ (stage1) implementation" fullbuild @@ -133,7 +56,7 @@ step00() { echo "C++ implementation in build/stage3/bin/zig. Will build zig1.wasm.zst." git reset --hard - git checkout $MERGE_WASI_BOOTSTRAP + git checkout $STEP00_A build/stage3/bin/zig build update-zig1 @@ -144,9 +67,18 @@ step00() { echo "Zig bootstrapped from selfhosted." } +# commit 9d93b2ccf11f584320a2c5209dd2d94705167695 +# Author: Veikka Tuominen +# Date: 2022-12-08T19:52:05+02:00 +# +# Eliminate `BoundFn` type from the language +# +# Closes #9484 +STEP01=9d93b2ccf11f584320a2c5209dd2d94705167695 +STEP01_=0.10.0-675-g9d93b2ccf1 step01() { - local TO="$BOUNDFN" - local TO_="$BOUNDFN_" + local TO="$STEP01" + local TO_="$STEP01_" echo "Generating zig1.wasm.zst for $TO_" rm -fr "../zig-$TO_" git archive --prefix=zig-$TO_/ $TO | tar -C .. -x @@ -162,11 +94,25 @@ step01() { echo "zig1.wasm.zst was built for BoundFn hack" } +# commit d10fd78d4615f329141f5c19f893039d56aff425 +# Author: Andrew Kelley +# Date: 2022-12-10T21:54:24+02:00 +# +# update zig1.wasm +# +# This includes the latest changes from master branch with fixes to the C +# backend that affect aarch64-windows which are necessary to build from +# source on this target. +# +# stage1/zig1.wasm | Bin 2315523 -> 2315899 bytes +# 1 file changed, 0 insertions(+), 0 deletions(-) +STEP02=d10fd78d4615f329141f5c19f893039d56aff425 +STEP02_=0.10.0-722-gd10fd78d46 step02() { - local FROM_="$BOUNDFN_" - local TO="$C_AARCH64" - local TO_="$C_AARCH64_" - echo "Generating zig1.wasm.zst for $C_AARCH64_" + local FROM_="$STEP01_" + local TO="$STEP02" + local TO_="$STEP02_" + echo "Generating zig1.wasm.zst for $STEP02_AARCH64_" rm -fr "../zig-$TO_" git archive --prefix=zig-$TO_/ $TO | tar -C .. -x @@ -180,10 +126,17 @@ step02() { echo "zig1.wasm.zst was built for C-aarch64 backend" } +# commit 7b2a936173165002105ba5e76bed69654e132fea +# Author: Veikka Tuominen +# Date: 2022-12-12T15:32:37+02:00 +# +# remove `stack` option from `@call` +STEP03=7b2a936173165002105ba5e76bed69654e132fea +STEP03_=0.10.0-747-g7b2a936173 step03() { - local FROM_="$C_AARCH64_" - local TO="$CALL_OPTIONS" - local TO_="$CALL_OPTIONS_" + local FROM_="$STEP02_" + local TO="$STEP03" + local TO_="$STEP03_" echo "Updating zig1.wasm from $FROM_ -> $TO_ in ../zig-$TO_" rm -fr "../zig-$TO_" @@ -198,10 +151,17 @@ step03() { echo "zig1.wasm updated for $TO" } +# commit 08b2d491bcd8c79c68495267cc71967661caea1e +# Author: Veikka Tuominen +# Date: 2022-12-12T15:32:37+02:00 +# +# update usages of `@call` +STEP04=08b2d491bcd8c79c68495267cc71967661caea1e +STEP04_=0.10.0-748-g08b2d491bc step04() { - local FROM_="$CALL_OPTIONS_" - local TO="$CALL_USAGES" - local TO_="$CALL_USAGES_" + local FROM_="$STEP03_" + local TO="$STEP04" + local TO_="$STEP04_" echo "Updating zig1.wasm from $FROM_ -> $TO_ in ../zig-$TO_" rm -fr "../zig-$TO_" @@ -217,10 +177,17 @@ step04() { echo "zig1.wasm updated for $TO_" } +# commit 35184bff75420f405cb703c9cf86b196843b9a94 (HEAD) +# Author: r00ster91 +# Date: 2022-12-13T23:30:06+02:00 +# +# std.builtin: rename Type.UnionField and Type.StructField's field_type to type +STEP05=aac2d6b56f32134ea32fb3d984e3fcdfddd8aaf6 +STEP05_=0.10.0-851-gaac2d6b56f step05() { - local FROM_="$CALL_USAGES_" - local TO="$BUILTIN_TYPE" - local TO_="$BUILTIN_TYPE_" + local FROM_="$STEP04_" + local TO="$STEP05" + local TO_="$STEP05_" echo "Updating zig1.wasm from $FROM_ -> $TO_ in ../zig-$TO_" rm -fr "../zig-$TO_" @@ -233,10 +200,17 @@ step05() { } } +# commit 2a5e1426aa9469fadb78e837d0100d689213b034 +# Author: Veikka Tuominen +# Date: 2022-12-16T19:44:25+02:00 +# +# update zig1.wasm to builtin.Type field changes +STEP06=2a5e1426aa9469fadb78e837d0100d689213b034 +STEP06_=0.10.0-853-g2a5e1426aa step06() { - local FROM_="$BUILTIN_TYPE_" - local TO="$REMOVE_BUILTIN_TYPE" - local TO_="$REMOVE_BUILTIN_TYPE_" + local FROM_="$STEP05_" + local TO="$STEP06" + local TO_="$STEP06_" echo "Updating zig1.wasm from $FROM_ -> $TO_ in ../zig-$TO_" rm -fr "../zig-$TO_" @@ -249,10 +223,17 @@ step06() { echo "zig1.wasm updated for $TO_" } +# commit 54160e7f6aecb4628df633ceaef4c6d956429a3d +# Author: Veikka Tuominen +# Date: 2022-12-21T14:33:02+02:00 +# +# Sema: make overflow arithmetic builtins return tuples +STEP07=54160e7f6aecb4628df633ceaef4c6d956429a3d +STEP07_=0.10.0-961-g54160e7f6a step07() { - local FROM_="$REMOVE_BUILTIN_TYPE_" - local TO="$BUILTINS_4TO2" - local TO_="$BUILTINS_4TO2_" + local FROM_="$STEP06_" + local TO="$STEP07" + local TO_="$STEP07_" echo "Building zig2 from $FROM_ -> $TO_ in ../zig-$TO_" rm -fr "../zig-$TO_" @@ -275,10 +256,17 @@ step07() { } } +# commit 622311fb9ac7ee6d93dcb8cda4b608751f7e092a +# Author: Veikka Tuominen +# Date: 2022-12-21T16:40:30+02:00 +# +# update uses of overflow arithmetic builtins +STEP08=622311fb9ac7ee6d93dcb8cda4b608751f7e092a +STEP08_=0.10.0-962-g622311fb9a step08() { - local FROM_="$BUILTINS_4TO2_" - local TO="$BUILTINS_4TO2_USES" - local TO_="$BUILTINS_4TO2_USES_" + local FROM_="$STEP07_" + local TO="$STEP08" + local TO_="$STEP08_" echo "Updating zig1.wasm from $FROM_ -> $TO_ in ../zig-$TO_" rm -fr "../zig-$TO_" @@ -290,6 +278,12 @@ step08() { } } +# commit a43fdc1620fa24c8c606f748505766bfd53d1049 +# Author: kcbanner +# Date: 2022-12-09T02:50:08+02:00 +# +# cbe: first set of changes for msvc compatibility + if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then set -xeuo pipefail step=${1:-step00}