Skip to content

Epic: Self-host critical path — compiler compiles itself (M3→M5) #1492

@PurHur

Description

@PurHur

Summary

Umbrella for implementation work between today's bootstrap (M0–M4 slice) and M5: the compiler fully compiles itself without Zend in the loop.

Target doc: docs/self-host-target.md
Gates: docs/bootstrap-selfhost.md

Living roadmap: #78


Milestone status (May 2026 — backlog-architect probe 2026-05-29)

Verified on master via tar-copy Docker (php-compiler:22.04-dev). Latest probe comment.

Milestone Gate Status Tracker
M0 minimal link make bootstrap-selfhost-link ✅ GREEN #2894
M2 spine / inventory bootstrap-inventory.php --check ✅ GREEN 726/726, 0 blockers
M3 HelloWorld strict make bootstrap-selfhost-helloworld ✅ GREEN (emit_path=native)
M3 JIT unit strict inventory compile_driver 🚧 partial #3038
M4 full-revision make bootstrap-selfhost-full-revision-probe ✅ GREEN #2880
M4 full ladder make bootstrap-loop-probe ✅ GREEN #1498
M5 vendor (committed) bootstrap-vendor-objects.php --compile ✅ GREEN 3/3
M5 vendor rebuild rm prelinked/*.o, BOOTSTRAP_M5_VENDOR_ALLOW_ZEND=0 🔴 RED #3054 · PR #3050
M5 spine w/o vendor/ rename-away vendor/ test 🔴 RED #3052
M5 gen-0 no Zend empty build/ link 🔴 RED #3053
M5 presenter north-star5-verify.sh --strict ✅ GREEN 3/3

First red compile-path command:

./script/docker-exec.sh --sync-back build/selfhost-native-compile-driver -- bash -lc '
  make bootstrap-selfhost-link
  rm -f prelinked/bootstrap-vendor/*.o
  BOOTSTRAP_M5_VENDOR_ALLOW_ZEND=0 PHP_COMPILER_VENDOR_PRELINK=1 php script/bootstrap-vendor-objects.php --compile
'

Symptom: missing object file after compile (native exit 0, no .o).


Next 3 priorities

  1. #3054 / PR #3050 — native KEEP_OBJECT_FILE vendor .o rebuild
  2. #3038 — JIT unit inventory compile_driver.php
  3. #3052 — spine link without vendor/ tree

Parallel: #3027 · #3053 · #3032


Verify

./script/docker-exec.sh -- bash -lc 'make bootstrap-loop-probe'
./script/docker-exec.sh -- bash -lc './script/north-star5-verify.sh --strict'
./script/docker-exec.sh --sync-back build/selfhost-native-compile-driver -- bash -lc '
  make bootstrap-selfhost-link
  rm -f prelinked/bootstrap-vendor/*.o
  BOOTSTRAP_M5_VENDOR_ALLOW_ZEND=0 PHP_COMPILER_VENDOR_PRELINK=1 php script/bootstrap-vendor-objects.php --compile
'

Metadata

Metadata

Assignees

No one assigned

    Labels

    implementation-readySpec complete: repro, php-src ref, done-when — safe for workers to claimphase-0:FoundationPhase 0 – foundation & DevEx

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions