step8 + shellcheck

This commit is contained in:
Motiejus Jakštys 2024-11-06 22:51:44 +02:00
parent 6c20b6aee5
commit e516351ba5

26
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 # Nuke the C++ implementation of Zig from orbit using WASI
MERGE_WASI_BOOTSTRAP=e7d28344fa3ee81d6ad7ca5ce1f83d50d8502118 MERGE_WASI_BOOTSTRAP=e7d28344fa3ee81d6ad7ca5ce1f83d50d8502118
MERGE_WASI_BOOTSTRAP_=0.10.0-610-ge7d28344fa #MERGE_WASI_BOOTSTRAP_=0.10.0-610-ge7d28344fa
# commit 3ba916584db5485c38ebf2390e8d22bc6d81bf8e # commit 3ba916584db5485c38ebf2390e8d22bc6d81bf8e
# Author: Andrew Kelley <andrew@ziglang.org> # Author: Andrew Kelley <andrew@ziglang.org>
@ -19,7 +19,7 @@ MERGE_WASI_BOOTSTRAP_=0.10.0-610-ge7d28344fa
# #
# actually remove stage1 # actually remove stage1
REMOVE_STAGE1=3ba916584db5485c38ebf2390e8d22bc6d81bf8e REMOVE_STAGE1=3ba916584db5485c38ebf2390e8d22bc6d81bf8e
REMOVE_STAGE1_=0.10.0-542-g3ba916584d #REMOVE_STAGE1_=0.10.0-542-g3ba916584d
# commit 28514476ef8c824c3d189d98f23d0f8d23e496ea # commit 28514476ef8c824c3d189d98f23d0f8d23e496ea
# Author: Andrew Kelley <andrew@ziglang.org> # Author: Andrew Kelley <andrew@ziglang.org>
@ -30,7 +30,7 @@ REMOVE_STAGE1_=0.10.0-542-g3ba916584d
# After this commit, the self-hosted compiler does not offer the option to # After this commit, the self-hosted compiler does not offer the option to
# use stage1 as a backend anymore. # use stage1 as a backend anymore.
REMOVE_FSTAGE1=28514476ef8c824c3d189d98f23d0f8d23e496ea REMOVE_FSTAGE1=28514476ef8c824c3d189d98f23d0f8d23e496ea
REMOVE_FSTAGE1_=0.10.0-539-g28514476ef #REMOVE_FSTAGE1_=0.10.0-539-g28514476ef
# commit 9d93b2ccf11f584320a2c5209dd2d94705167695 # commit 9d93b2ccf11f584320a2c5209dd2d94705167695
# Author: Veikka Tuominen <git@vexu.eu> # Author: Veikka Tuominen <git@vexu.eu>
@ -163,7 +163,6 @@ step1() {
} }
step2() { step2() {
local FROM="$BOUNDFN"
local FROM_="$BOUNDFN_" local FROM_="$BOUNDFN_"
local TO="$C_AARCH64" local TO="$C_AARCH64"
local TO_="$C_AARCH64_" local TO_="$C_AARCH64_"
@ -182,7 +181,6 @@ step2() {
} }
step3() { step3() {
local FROM="$C_AARCH64"
local FROM_="$C_AARCH64_" local FROM_="$C_AARCH64_"
local TO="$CALL_OPTIONS" local TO="$CALL_OPTIONS"
local TO_="$CALL_OPTIONS_" local TO_="$CALL_OPTIONS_"
@ -201,7 +199,6 @@ step3() {
} }
step4() { step4() {
local FROM="$CALL_OPTIONS"
local FROM_="$CALL_OPTIONS_" local FROM_="$CALL_OPTIONS_"
local TO="$CALL_USAGES" local TO="$CALL_USAGES"
local TO_="$CALL_USAGES_" local TO_="$CALL_USAGES_"
@ -221,7 +218,6 @@ step4() {
} }
step5() { step5() {
local FROM="$CALL_USAGES"
local FROM_="$CALL_USAGES_" local FROM_="$CALL_USAGES_"
local TO="$BUILTIN_TYPE" local TO="$BUILTIN_TYPE"
local TO_="$BUILTIN_TYPE_" local TO_="$BUILTIN_TYPE_"
@ -238,7 +234,6 @@ step5() {
} }
step6() { step6() {
local FROM="$BUILTIN_TYPE"
local FROM_="$BUILTIN_TYPE_" local FROM_="$BUILTIN_TYPE_"
local TO="$REMOVE_BUILTIN_TYPE" local TO="$REMOVE_BUILTIN_TYPE"
local TO_="$REMOVE_BUILTIN_TYPE_" local TO_="$REMOVE_BUILTIN_TYPE_"
@ -255,7 +250,6 @@ step6() {
} }
step7() { step7() {
local FROM="$REMOVE_BUILTIN_TYPE"
local FROM_="$REMOVE_BUILTIN_TYPE_" local FROM_="$REMOVE_BUILTIN_TYPE_"
local TO="$BUILTINS_4TO2" local TO="$BUILTINS_4TO2"
local TO_="$BUILTINS_4TO2_" local TO_="$BUILTINS_4TO2_"
@ -267,14 +261,22 @@ step7() {
pushd "../zig-$TO_" pushd "../zig-$TO_"
patch -p1 <"$HERE/0.10.0-961-g54160e7f6a-CMakeLists.txt-remove-stage3.patch" patch -p1 <"$HERE/0.10.0-961-g54160e7f6a-CMakeLists.txt-remove-stage3.patch"
cp ../zig-$FROM_/stage1/zig1.wasm stage1/zig1.wasm cp ../zig-$FROM_/stage1/zig1.wasm stage1/zig1.wasm
fullbuild
# same as "fullbuild", except the make target does not have "install"
{
rm -fr build
mkdir build
pushd build
CC=clang-15 CXX=clang++-15 cmake ..
make -j"$(nproc)"
popd
}
build/zig2 build update-zig1 build/zig2 build update-zig1
popd popd
} }
} }
step8() { step8() {
local FROM="$BUILTINS_4TO2"
local FROM_="$BUILTINS_4TO2_" local FROM_="$BUILTINS_4TO2_"
local TO="$BUILTINS_4TO2_USES" local TO="$BUILTINS_4TO2_USES"
local TO_="$BUILTINS_4TO2_USES_" local TO_="$BUILTINS_4TO2_USES_"
@ -291,8 +293,6 @@ step8() {
} }
} }
if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
set -xeuo pipefail set -xeuo pipefail
step=${1:-step0} step=${1:-step0}