more nonbinary uses

This commit is contained in:
Motiejus Jakštys 2024-11-06 15:13:57 +02:00
parent 0dbd121d15
commit 9bfd86c4f5

121
run
View File

@ -11,7 +11,7 @@ HERE=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)
#
# Nuke the C++ implementation of Zig from orbit using WASI
MERGE_WASI_BOOTSTRAP=e7d28344fa3ee81d6ad7ca5ce1f83d50d8502118
#MERGE_WASI_BOOTSTRAP=0.10.0-610-ge7d28344fa
MERGE_WASI_BOOTSTRAP_=0.10.0-610-ge7d28344fa
# commit 3ba916584db5485c38ebf2390e8d22bc6d81bf8e
# Author: Andrew Kelley <andrew@ziglang.org>
@ -19,7 +19,7 @@ MERGE_WASI_BOOTSTRAP=e7d28344fa3ee81d6ad7ca5ce1f83d50d8502118
#
# actually remove stage1
REMOVE_STAGE1=3ba916584db5485c38ebf2390e8d22bc6d81bf8e
#REMOVE_STAGE1=0.10.0-542-g3ba916584d
REMOVE_STAGE1_=0.10.0-542-g3ba916584d
# commit 28514476ef8c824c3d189d98f23d0f8d23e496ea
# Author: Andrew Kelley <andrew@ziglang.org>
@ -30,7 +30,7 @@ REMOVE_STAGE1=3ba916584db5485c38ebf2390e8d22bc6d81bf8e
# 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
REMOVE_FSTAGE1_=0.10.0-539-g28514476ef
# commit 9d93b2ccf11f584320a2c5209dd2d94705167695
# Author: Veikka Tuominen <git@vexu.eu>
@ -40,7 +40,7 @@ REMOVE_FSTAGE1=28514476ef8c824c3d189d98f23d0f8d23e496ea
#
# Closes #9484
BOUNDFN=9d93b2ccf11f584320a2c5209dd2d94705167695
#BOUNDFN=0.10.0-675-g9d93b2ccf1
BOUNDFN_=0.10.0-675-g9d93b2ccf1
# commit d10fd78d4615f329141f5c19f893039d56aff425
# Author: Andrew Kelley <andrew@ziglang.org>
@ -55,7 +55,7 @@ BOUNDFN=9d93b2ccf11f584320a2c5209dd2d94705167695
# stage1/zig1.wasm | Bin 2315523 -> 2315899 bytes
# 1 file changed, 0 insertions(+), 0 deletions(-)
C_AARCH64=d10fd78d4615f329141f5c19f893039d56aff425
#C_AARCH64=0.10.0-722-gd10fd78d46
C_AARCH64_=0.10.0-722-gd10fd78d46
# commit 7b2a936173165002105ba5e76bed69654e132fea
# Author: Veikka Tuominen <git@vexu.eu>
@ -63,7 +63,7 @@ C_AARCH64=d10fd78d4615f329141f5c19f893039d56aff425
#
# remove `stack` option from `@call`
CALL_OPTIONS=7b2a936173165002105ba5e76bed69654e132fea
#CALL_OPTIONS=0.10.0-747-g7b2a936173
CALL_OPTIONS_=0.10.0-747-g7b2a936173
# commit 08b2d491bcd8c79c68495267cc71967661caea1e
# Author: Veikka Tuominen <git@vexu.eu>
@ -71,7 +71,7 @@ CALL_OPTIONS=7b2a936173165002105ba5e76bed69654e132fea
#
# update usages of `@call`
CALL_USAGES=08b2d491bcd8c79c68495267cc71967661caea1e
#CALL_USAGES=0.10.0-748-g08b2d491bc
CALL_USAGES_=0.10.0-748-g08b2d491bc
# commit 2a5e1426aa9469fadb78e837d0100d689213b034
# Author: Veikka Tuominen <git@vexu.eu>
@ -79,7 +79,16 @@ CALL_USAGES=08b2d491bcd8c79c68495267cc71967661caea1e
#
# update zig1.wasm to builtin.Type field changes
BUILTIN_TYPE=2a5e1426aa9469fadb78e837d0100d689213b034
#BUILTIN_TYPE=0.10.0-853-g2a5e1426aa
BUILTIN_TYPE_=0.10.0-853-g2a5e1426aa
fullbuild() {
rm -fr build
mkdir build
pushd build
CC=clang-15 CXX=clang++-15 cmake ..
make -j"$(nproc)" install
popd
}
step00() {
git checkout $MERGE_WASI_BOOTSTRAP
@ -95,13 +104,7 @@ step00() {
git checkout $REMOVE_FSTAGE1~1 build.zig CMakeLists.txt
echo "Building the C++ (stage1) implementation"
mkdir build
{
pushd build
CC=clang-15 CXX=clang++-15 cmake ..
make -j"$(nproc)" install
popd
}
fullbuild
echo "C++ implementation in build/stage3/bin/zig. Will build zig1.wasm.zst."
@ -112,34 +115,23 @@ step00() {
echo "stage1/zig1.wasm.zst built. Bootstrapping zig with it."
rm -fr build
mkdir build
{
pushd build
CC=clang-15 CXX=clang++-15 cmake ..
make -j"$(nproc)" install
popd
}
fullbuild
echo "Zig bootstrapped from selfhosted."
}
step10() {
echo "Generating zig1.wasm.zst for $BOUNDFN"
rm -fr ../zig-$BOUNDFN
git archive --prefix=zig-$BOUNDFN/ $BOUNDFN | tar -C .. -x
local TO="$BOUNDFN"
local TO_="$BOUNDFN_"
echo "Generating zig1.wasm.zst for $TO_"
rm -fr "../zig-$TO_"
git clone . "../zig-${TO_}" $TO
{
pushd "../zig-$BOUNDFN"
cp "../$OLDPWD/stage1/zig1.wasm.zst" stage1/
pushd "../zig-$BOUNDFN_"
cp "$OLDPWD/stage1/zig1.wasm.zst" stage1/
patch -p1 <"$HERE/0.10.0-675-g9d93b2ccf1-TypeOf-hack.patch"
mkdir build
{
pushd build
CC=clang-15 CXX=clang++-15 cmake ..
make -j"$(nproc)" install
popd
}
fullbuild
build/stage3/bin/zig build update-zig1
popd
}
@ -147,20 +139,18 @@ step10() {
}
step20() {
echo "Generating zig1.wasm.zst for $C_AARCH64"
rm -fr ../zig-$BOUNDFN
git archive --prefix=zig-$C_AARCH64/ $C_AARCH64 | tar -C .. -x
local FROM="$BOUNDFN"
local FROM_="$BOUNDFN_"
local TO="$C_AARCH64"
local TO_="$C_AARCH64_"
echo "Generating zig1.wasm.zst for $C_AARCH64_"
rm -fr "../zig-$TO_"
git clone . "../zig-${TO_}" $TO
{
pushd "../zig-$C_AARCH64"
zstd -cd ../zig-$BOUNDFN/stage1/zig1.wasm.zst >stage1/zig1.wasm
mkdir build
{
pushd build
CC=clang-15 CXX=clang++-15 cmake ..
make -j"$(nproc)" install
popd
}
pushd "../zig-$TO_"
zstd -cd ../zig-$FROM_/stage1/zig1.wasm.zst >stage1/zig1.wasm
fullbuild
build/stage3/bin/zig build update-zig1
popd
}
@ -169,43 +159,42 @@ step20() {
step30() {
local FROM="$C_AARCH64"
local FROM_="$C_AARCH64_"
local TO="$CALL_OPTIONS"
local TO_="$CALL_OPTIONS_"
echo "Updating zig1.wasm from $FROM -> $TO in ../zig-$TO"
rm -fr "../zig-$TO"
git archive --prefix="zig-$TO/" "$TO" | tar -C .. -x
echo "Updating zig1.wasm from $FROM_ -> $TO_ in ../zig-$TO_"
rm -fr "../zig-$TO_"
git clone . "../zig-$TO_" $TO
{
pushd "../zig-$TO"
patch -p1 <"$HERE0.10.0-747-g7b2a936173-CallOptions.patch"
"../zig-$FROM/build/stage3/bin/zig" build --zig-lib-dir lib update-zig1
pushd "../zig-$TO_"
patch -p1 <"$HERE/0.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 FROM_="$CALL_OPTIONS_"
local TO="$CALL_USAGES"
rm -fr "../zig-$TO"
git archive --prefix=zig-$TO/ "$TO" | tar -C .. -x
local TO_="$CALL_USAGES_"
echo "Updating zig1.wasm from $FROM_ -> $TO_ in ../zig-$TO_"
rm -fr "../zig-$TO_"
git clone . "../zig-$TO_" $TO
{
pushd "../zig-$TO"
cp ../zig-$FROM/stage1/zig1.wasm stage1/zig1.wasm
pushd "../zig-$TO_"
cp ../zig-$FROM_/stage1/zig1.wasm stage1/zig1.wasm
mkdir build
{
pushd build
CC=clang-15 CXX=clang++-15 cmake ..
make -j"$(nproc)" install
popd
}
fullbuild
build/stage3/bin/zig build update-zig1
popd
}
echo "zig1.wasm updated for $TO"
echo "zig1.wasm updated for $TO_"
}
if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then