Skip to content

Self-host M2: native bin/vm.php -r smoke on compiler_lib_spine bundle #1846

Description

@PurHur

Problem

M2 spine bundle compiler_lib_spine_smoke links natively (582/586 units, #1419, #1821) and prints a fixed probe string. M5 requires the real bin/vm.php driver path on the inventory — not a bespoke smoke binary.

Today there is no gate that:

  1. Builds the spine AOT binary (make bootstrap-selfhost-lib-spine-smoke)
  2. Runs bin/vm.php -r 'echo "vm-spine-ok\n";' semantics through the compiled bundle (or a thin wrapper that exercises VM dispatch from native code)

Contributors can grow the spine file count while the eventual bin/vm.php entry path remains untested.

Goal

Add bootstrap script + Makefile target:

BOOTSTRAP_LIB_SPINE_VM_SMOKE=1 make bootstrap-selfhost-lib-spine-vm-smoke
# stdout contains: vm-spine-ok

Uses the same spine link artifact as bootstrap-selfhost-lib-spine-smoke; adds a minimal -r echo (or test/bootstrap-aot/vm_spine_echo.php) executed via native VM entry.

Implementation hints

Piece Location Notes
Link Makefile bootstrap-selfhost-lib-spine-smoke Reuse build/selfhost-lib-spine binary
Entry test/bootstrap-aot/vm_spine_echo.php or inline -r Smallest VM path
Driver bin/vm.php inventory subset Defer full 586-file bundle to #1521 / #1492
CI BOOTSTRAP_LIB_SPINE_VM_SMOKE_GATE=0 in ci-defaults.env Opt-in in ci-local.sh llvm tail until green
Blockers #1821 final Vm* units May need spine growth first

Acceptance criteria

make bootstrap-wave-check
BOOTSTRAP_LIB_SPINE_VM_SMOKE=1 ./script/bootstrap-selfhost-lib-spine-vm-smoke.sh
# Docker:
docker run --rm -v "$(pwd):/compiler" -w /compiler php-compiler:22.04-dev bash -lc \
  'BOOTSTRAP_LIB_SPINE_VM_SMOKE=1 make bootstrap-selfhost-lib-spine-vm-smoke'

Dependencies

Verification

Local/Docker only — no GHA (#394 ✅).

Links

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions