Milestone
M5 (bootstrap driver) — parent #1492 (closed #1521 proved native driver smoke; gen-0 entrypoints still Zend)
Problem
M4 ladder is green (make bootstrap-loop-probe, gen-2→gen-3 717/717), and BOOTSTRAP_M5_DRIVER_SMOKE=1 make bootstrap-selfhost-driver-smoke uses a compiled gen-2 driver for emit+run. Yet every fresh tree still requires host Zend for the first native link:
script/bootstrap-selfhost-link.sh (and siblings) call:
php "${ROOT}/bin/compile.php" -o "${OUT}" "${ENTRY}"
Harness 2026-05-27: build/selfhost-compile-driver and PHP_COMPILER_M3_SOURCE=bin/compile.php helloworld-compile-bin are green, but bootstrap-selfhost-link does not use them for gen-0.
Scope
| Path |
Work |
script/bootstrap-selfhost-link.sh |
After one-time gen-0 link, prefer build/selfhost-compile-driver or build/bin-compile-aot when present |
script/bootstrap-selfhost-lib-spine-smoke-link.sh |
Same pattern for spine link |
script/bootstrap-loop-gen1-link.sh |
Ensure gen-1 path does not re-invoke Zend when compiled driver exists |
lib/JIT.php, lib/Cli/ |
Any remaining driver symbols for inventory-scale link |
Makefile |
Document two-stage bootstrap env vars |
Repro
# Green M4/M5 slices (compiled driver):
./script/docker-exec.sh -- bash -lc 'make bootstrap-selfhost-driver-smoke'
./script/docker-exec.sh -- bash -lc '
export PHP_COMPILER_M3_SOURCE=bin/compile.php
./script/bootstrap-selfhost-helloworld-compile-bin.sh
'
# Still Zend on gen-0:
grep -n 'php.*bin/compile.php' script/bootstrap-selfhost-link.sh
./script/docker-exec.sh -- bash -lc 'make bootstrap-selfhost-link'
# uses php bin/compile.php (requires host php + vendor/)
Done when
Labels
self-host, bootstrap, IMPORTANT
Links
#1492 · #1521 ✅ · #2697 ✅ · #1416 (cold boot)
Milestone
M5 (bootstrap driver) — parent #1492 (closed #1521 proved native driver smoke; gen-0 entrypoints still Zend)
Problem
M4 ladder is green (
make bootstrap-loop-probe, gen-2→gen-3 717/717), andBOOTSTRAP_M5_DRIVER_SMOKE=1 make bootstrap-selfhost-driver-smokeuses a compiled gen-2 driver for emit+run. Yet every fresh tree still requires host Zend for the first native link:script/bootstrap-selfhost-link.sh(and siblings) call:Harness 2026-05-27:
build/selfhost-compile-driverandPHP_COMPILER_M3_SOURCE=bin/compile.phphelloworld-compile-bin are green, butbootstrap-selfhost-linkdoes not use them for gen-0.Scope
script/bootstrap-selfhost-link.shbuild/selfhost-compile-driverorbuild/bin-compile-aotwhen presentscript/bootstrap-selfhost-lib-spine-smoke-link.shscript/bootstrap-loop-gen1-link.shlib/JIT.php,lib/Cli/MakefileRepro
Done when
make bootstrap-*use compiled driver whenbuild/selfhost-compile-driverexistsmake bootstrap-selfhost-linksucceeds on a host withoutphpwhen gen-0 artifact + compiled driver already built (or skip gen-0 with env)docs/bootstrap-selfhost.mdrow “Bootstrap driver” reflects compiled path as defaultLabels
self-host,bootstrap,IMPORTANTLinks
#1492 · #1521 ✅ · #2697 ✅ · #1416 (cold boot)