release: v0.7.0 — FPC-independent, fully self-hosting
Bump version to 0.7.0. Update fixpoint.sh to use the latest release binary as stage-1 instead of FPC — FPC is no longer needed anywhere in the toolchain.
This commit is contained in:
parent
3fd84e43b5
commit
0cfb9ffa98
|
|
@ -28,7 +28,7 @@ uses
|
||||||
uStrCompat;
|
uStrCompat;
|
||||||
|
|
||||||
const
|
const
|
||||||
Version = '0.7.0-dev';
|
Version = '0.7.0';
|
||||||
CompilerName = 'Blaise';
|
CompilerName = 'Blaise';
|
||||||
|
|
||||||
procedure PrintUsage;
|
procedure PrintUsage;
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project>
|
<project>
|
||||||
<name>blaise</name>
|
<name>blaise</name>
|
||||||
<version>0.7.0-SNAPSHOT</version>
|
<version>0.7.0</version>
|
||||||
<author>Graeme Geldenhuys</author>
|
<author>Graeme Geldenhuys</author>
|
||||||
<license>Apache-2.0 WITH Swift-exception</license>
|
<license>Apache-2.0 WITH Swift-exception</license>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,41 +1,44 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Fixpoint test for the Blaise self-hosting check.
|
# Fixpoint test for the Blaise self-hosting check.
|
||||||
#
|
#
|
||||||
# Steps:
|
# Uses the most recent release binary as stage-1 (no FPC dependency).
|
||||||
# 1. Clean rebuild compiler (removes stale .ppu/.o files).
|
|
||||||
# 2. Rebuild + install RTL (cheap when nothing changed).
|
|
||||||
# 3. stage1 -> stage2 IR (FPC-built binary compiles current source).
|
|
||||||
# 4. Assemble + link stage-2 binary via QBE + gcc.
|
|
||||||
# 5. stage2 -> stage3 IR (self-compiled binary compiles same source).
|
|
||||||
# 6. diff stage-2.ssa stage-3.ssa => empty = clean fixpoint.
|
|
||||||
#
|
#
|
||||||
# A 5-minute timeout is wrapped around the stage-2 invocation so a hung
|
# Steps:
|
||||||
# self-compiled binary doesn't lock the whole bisect loop.
|
# 1. Find stage-1 binary (latest release or explicit $STAGE1).
|
||||||
|
# 2. Rebuild + install RTL (cheap when nothing changed).
|
||||||
|
# 3. stage-1 -> stage-2 IR.
|
||||||
|
# 4. Assemble + link stage-2 binary via QBE + gcc.
|
||||||
|
# 5. stage-2 -> stage-3 IR (5-minute timeout).
|
||||||
|
# 6. diff stage-2.ssa stage-3.ssa => empty = clean fixpoint.
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# Must be run from the project root (where pasbuild.xml lives).
|
|
||||||
if [ ! -f "compiler/src/main/pascal/Blaise.pas" ]; then
|
if [ ! -f "compiler/src/main/pascal/Blaise.pas" ]; then
|
||||||
echo "Run this script from the project root: ./scripts/fixpoint.sh" >&2
|
echo "Run this script from the project root: ./scripts/fixpoint.sh" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "[1/6] clean + rebuild compiler"
|
# Stage-1 binary: honour $STAGE1, otherwise pick the latest release.
|
||||||
pasbuild clean > /tmp/fp_clean.log 2>&1
|
if [ -n "$STAGE1" ]; then
|
||||||
pasbuild compile -m blaise-compiler > /tmp/fp_compile.log 2>&1
|
STAGE1_BIN="$STAGE1"
|
||||||
if [ ! -x compiler/target/blaise ]; then
|
elif [ -d releases ]; then
|
||||||
echo "COMPILE_FAIL"
|
LATEST=$(ls -d releases/v* 2>/dev/null | sort -V | tail -1)
|
||||||
tail -10 /tmp/fp_compile.log
|
STAGE1_BIN="$LATEST/blaise"
|
||||||
exit 10
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "[2/6] rebuild + install RTL"
|
if [ ! -x "$STAGE1_BIN" ]; then
|
||||||
|
echo "No stage-1 binary found. Set STAGE1=/path/to/blaise or add a release." >&2
|
||||||
|
exit 10
|
||||||
|
fi
|
||||||
|
echo "stage-1: $STAGE1_BIN"
|
||||||
|
|
||||||
|
echo "[1/5] rebuild + install RTL"
|
||||||
( cd rtl && make > /tmp/fp_rtl.log 2>&1 && make install >> /tmp/fp_rtl.log 2>&1 ) || {
|
( cd rtl && make > /tmp/fp_rtl.log 2>&1 && make install >> /tmp/fp_rtl.log 2>&1 ) || {
|
||||||
echo "RTL_FAIL"; tail -5 /tmp/fp_rtl.log; exit 11;
|
echo "RTL_FAIL"; tail -5 /tmp/fp_rtl.log; exit 11;
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "[3/6] stage1 -> stage2 IR"
|
echo "[2/5] stage-1 -> stage-2 IR"
|
||||||
compiler/target/blaise --source compiler/src/main/pascal/Blaise.pas \
|
"$STAGE1_BIN" --source compiler/src/main/pascal/Blaise.pas \
|
||||||
--unit-path compiler/src/main/pascal --unit-path rtl/src/main/pascal \
|
--unit-path compiler/src/main/pascal --unit-path rtl/src/main/pascal \
|
||||||
--emit-ir > /tmp/fp_stage2.ssa 2>/tmp/fp_stage2.err
|
--emit-ir > /tmp/fp_stage2.ssa 2>/tmp/fp_stage2.err
|
||||||
if [ ! -s /tmp/fp_stage2.ssa ] || head -1 /tmp/fp_stage2.ssa | grep -qi 'error\|exception'; then
|
if [ ! -s /tmp/fp_stage2.ssa ] || head -1 /tmp/fp_stage2.ssa | grep -qi 'error\|exception'; then
|
||||||
|
|
@ -44,9 +47,9 @@ if [ ! -s /tmp/fp_stage2.ssa ] || head -1 /tmp/fp_stage2.ssa | grep -qi 'error\|
|
||||||
head -3 /tmp/fp_stage2.err
|
head -3 /tmp/fp_stage2.err
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
echo " stage2 IR: $(wc -l < /tmp/fp_stage2.ssa) lines"
|
echo " stage-2 IR: $(wc -l < /tmp/fp_stage2.ssa) lines"
|
||||||
|
|
||||||
echo "[4/6] assemble + link stage-2 binary"
|
echo "[3/5] assemble + link stage-2 binary"
|
||||||
vendor/qbe/qbe -o /tmp/fp_stage2.s /tmp/fp_stage2.ssa 2>/tmp/fp_qbe.err || {
|
vendor/qbe/qbe -o /tmp/fp_stage2.s /tmp/fp_stage2.ssa 2>/tmp/fp_qbe.err || {
|
||||||
echo "QBE_FAIL"; cat /tmp/fp_qbe.err; exit 2;
|
echo "QBE_FAIL"; cat /tmp/fp_qbe.err; exit 2;
|
||||||
}
|
}
|
||||||
|
|
@ -54,7 +57,7 @@ gcc -o /tmp/fp_blaise2 /tmp/fp_stage2.s compiler/target/blaise_rtl.a 2>/tmp/fp_g
|
||||||
echo "GCC_FAIL"; cat /tmp/fp_gcc.err; exit 3;
|
echo "GCC_FAIL"; cat /tmp/fp_gcc.err; exit 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "[5/6] stage2 -> stage3 IR (5min timeout)"
|
echo "[4/5] stage-2 -> stage-3 IR (5min timeout)"
|
||||||
timeout 300 /tmp/fp_blaise2 --source compiler/src/main/pascal/Blaise.pas \
|
timeout 300 /tmp/fp_blaise2 --source compiler/src/main/pascal/Blaise.pas \
|
||||||
--unit-path compiler/src/main/pascal --unit-path rtl/src/main/pascal \
|
--unit-path compiler/src/main/pascal --unit-path rtl/src/main/pascal \
|
||||||
--emit-ir > /tmp/fp_stage3.ssa 2>/tmp/fp_stage3.err
|
--emit-ir > /tmp/fp_stage3.ssa 2>/tmp/fp_stage3.err
|
||||||
|
|
@ -70,9 +73,9 @@ elif [ $RC -ne 0 ]; then
|
||||||
head -3 /tmp/fp_stage3.err
|
head -3 /tmp/fp_stage3.err
|
||||||
exit 5
|
exit 5
|
||||||
fi
|
fi
|
||||||
echo " stage3 IR: $(wc -l < /tmp/fp_stage3.ssa) lines"
|
echo " stage-3 IR: $(wc -l < /tmp/fp_stage3.ssa) lines"
|
||||||
|
|
||||||
echo "[6/6] compare"
|
echo "[5/5] compare"
|
||||||
DIFFLINES=$(diff /tmp/fp_stage2.ssa /tmp/fp_stage3.ssa | wc -l)
|
DIFFLINES=$(diff /tmp/fp_stage2.ssa /tmp/fp_stage3.ssa | wc -l)
|
||||||
if [ $DIFFLINES -eq 0 ]; then
|
if [ $DIFFLINES -eq 0 ]; then
|
||||||
echo "FIXPOINT_OK"
|
echo "FIXPOINT_OK"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue