commit 65a9e442ada96be60dd57df653ac339ba6520d7f
parent 178cb2b75ea76bdc88b8bd5c92774b2225a50f73
Author: Ryan Sepassi <rsepassi@gmail.com>
Date: Tue, 2 Jun 2026 09:32:08 -0700
test: split test-bootstrap-toy into -debug/-release sub-targets
Run the Toy corpus through both the debug and release (-O1) bootstrapped
stage3 compilers. The original test-bootstrap-toy now aggregates the two
new test-bootstrap-toy-debug / test-bootstrap-toy-release targets, so the
self-hosted compiler is exercised in both build modes.
Diffstat:
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/test/test.mk b/test/test.mk
@@ -49,6 +49,8 @@ TEST_TARGETS = \
test-hostas-cross \
test-diff-llvm \
test-bootstrap-toy \
+ test-bootstrap-toy-debug \
+ test-bootstrap-toy-release \
test-bounce \
test-cbackend \
test-cg-api \
@@ -401,9 +403,16 @@ test-toy: bin
# test-bootstrap-toy: run the Toy corpus through the bootstrapped (self-built)
# stage3 cfree instead of the host-built binary, so the self-hosted compiler is
# exercised on real codegen (not just self-reproduction like `make bootstrap`).
-test-bootstrap-toy: bootstrap-debug
+# Split per build mode: -debug runs the debug stage3, -release the release
+# (-O1) stage3; the aggregate target runs both.
+test-bootstrap-toy: test-bootstrap-toy-debug test-bootstrap-toy-release
+
+test-bootstrap-toy-debug: bootstrap-debug
@CFREE='$(abspath $(BUILD_DIR)/debug/bootstrap/stage3/cfree)' test/toy/run.sh
+test-bootstrap-toy-release: bootstrap-release
+ @CFREE='$(abspath $(BUILD_DIR)/release/bootstrap/stage3/cfree)' test/toy/run.sh
+
# Public-API inline-asm backend tests. These emit a tiny function through CG,
# reopen the object through the public object reader, and assert the expected