Skip to content

Self-host M2: native-link bin/vm.php + lib/AOT/Linker.php in spine smoke #2134

Description

@PurHur

Problem

M2 spine native link is green on master after #2499 / #2502#2504 (May 2026 harness):

script/apply-patches.sh
BOOTSTRAP_LIB_SPINE_SMOKE=1 make bootstrap-selfhost-lib-spine-smoke
# stdout: compiler_lib_spine_smoke bundle OK
php bin/compile.php -l test/selfhost/compiler_lib_spine_smoke/main.php   # exit 0

Remaining M2 gap: only bin/vm.php is deferred from native-link smoke (SSOT script/bootstrap-spine-deferred-lib.php). Today the spine uses substitute test/bootstrap-aot/vm_run_smoke.php.

Path Status Notes
lib/AOT/Linker.php ✅ promoted #2267 — real require_once in spine
bin/vm.php 🚧 deferred Execute smoke #2201 after promotion

Coverage: 661 spine require_once / 657 inventory files (php script/bootstrap-spine-count.php); count semantics #2500.

Goal

  1. Promote bin/vm.php to real require_once in test/selfhost/compiler_lib_spine_smoke/main.php with native link green
  2. $spineNativeLinkDeferred[] in script/bootstrap-spine-deferred-lib.php
  3. Unblock Self-host M2: BootstrapVmDriver native execute smoke (post-#2134 bin/vm.php link) #2201 VM driver execute probe

Gates

Gate Command CI env
M2 spine compile+link BOOTSTRAP_LIB_SPINE_SMOKE=1 make bootstrap-selfhost-lib-spine-smoke BOOTSTRAP_LIB_SPINE_SMOKE=1
M2 spine lint php bin/compile.php -l test/selfhost/compiler_lib_spine_smoke/main.php bootstrap-selfhost-lint.sh
M2 VM -r smoke BOOTSTRAP_LIB_SPINE_VM_SMOKE=1 make bootstrap-selfhost-lib-spine-vm-smoke BOOTSTRAP_LIB_SPINE_VM_SMOKE_GATE=1
Coverage php script/check-selfhost-spine-coverage-sync.php --verbose SELFHOST_SPINE_COVERAGE_SYNC_GATE=1
Deferred footnotes php script/check-selfhost-spine-deferred-sync.php SELFHOST_SPINE_DEFERRED_SYNC_GATE
M4 dry-run ./script/bootstrap-loop-probe.sh --dry-run BOOTSTRAP_LOOP_PROBE_GATE=1

Files

Piece Path
Spine bundle test/selfhost/compiler_lib_spine_smoke/main.php
VM entry bin/vm.php
Substitute (remove) test/bootstrap-aot/vm_run_smoke.php
Deferred SSOT script/bootstrap-spine-deferred-lib.php
Link script script/bootstrap-selfhost-lib-spine-smoke-link.sh

Done when

Repro

./script/docker-exec.sh -- bash -lc '
  script/apply-patches.sh
  BOOTSTRAP_LIB_SPINE_SMOKE=1 make bootstrap-selfhost-lib-spine-smoke
'

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