Skip to content

Self-host M5: prefer compiled bootstrap driver with Zend fallback (#2842) - #2845

Merged
PurHur merged 2 commits into
masterfrom
fix/issue-2842-compiled-bootstrap-driver
May 27, 2026
Merged

PurHur merged 2 commits into
masterfrom
fix/issue-2842-compiled-bootstrap-driver

Conversation

@PurHur

@PurHur PurHur commented May 27, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add script/bootstrap-resolve-compile-invoke.sh to resolve gen-0 AOT link invocations: prefer build/selfhost-compile-driver, build/selfhost-native-compile-driver, or build/bin-compile-aot when executable.
  • Wire bootstrap-selfhost-link.sh, bootstrap-selfhost-lib-spine-smoke-link.sh, and bootstrap-loop-gen1-link.sh through the resolver.
  • When a compiled driver is present but cannot produce the output binary (exit non-zero, missing -o artifact, or segfault), automatically fall back to Zend php bin/compile.php so M0–M4 gates stay green until inventory-scale native link is stable.

Verification

./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && ./script/bootstrap-selfhost-driver-host-compile.sh >/dev/null && ./script/bootstrap-selfhost-link.sh'
# logs compiled attempt + Zend fallback → compiler_minimal bundle OK

./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && make bootstrap-loop-gen1-link'

vendor/bin/phpunit --filter BootstrapSelfhostLinkTest

Closes #2842 (partial — two-stage bootstrap plumbing; full no-Zend gen-0 link blocked on compiled driver link parity).

Test plan

  • bootstrap-selfhost-link with compiled driver present (fallback path)
  • make bootstrap-loop-gen1-link
  • BootstrapSelfhostLinkTest

Made with Cursor

PurHur and others added 2 commits May 27, 2026 22:43
)

Add bootstrap-resolve-compile-invoke.sh and wire gen-0 link scripts to use
build/selfhost-compile-driver or bin-compile-aot when present, falling back
to php bin/compile.php when the native driver cannot produce the output binary.

Co-authored-by: Cursor <cursoragent@cursor.com>
…r resolver

Keep #2810 preflight for Zend gen-0 paths; skip php-only preflight when a native
compiled driver is selected (#2842).

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur
PurHur merged commit c9e0049 into master May 27, 2026
@PurHur
PurHur deleted the fix/issue-2842-compiled-bootstrap-driver branch May 27, 2026 22:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Self-host M5: gen-0 bootstrap link scripts still shell out to Zend php bin/compile.php

1 participant