Skip to content

Self-host M5: bin/compile.php AOT — literal include + LinkerProcessPolyfill lowering#2789

Merged
PurHur merged 1 commit into
masterfrom
agent/selfhost-bin-compile-literal-include
May 27, 2026
Merged

Self-host M5: bin/compile.php AOT — literal include + LinkerProcessPolyfill lowering#2789
PurHur merged 1 commit into
masterfrom
agent/selfhost-bin-compile-literal-include

Conversation

@PurHur
Copy link
Copy Markdown
Owner

@PurHur PurHur commented May 27, 2026

Summary

Unblocks native AOT of bin/compile.php under PHP_COMPILER_SELFHOST_AOT=1 (was failing with dynamic-include / undefined-static-method errors; see #2697).

Test plan

  • ./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && export PHP_COMPILER_SELFHOST_AOT=1 && php bin/compile.php -o /tmp/out bin/compile.php' → exit 0, binary produced
  • phpunit --filter testSelfHostAotBinCompilePhpCompiles test/unit/BootstrapAotJitCompileTest.php
  • PHP_COMPILER_M3_SOURCE=bin/compile.php ./script/bootstrap-selfhost-helloworld-compile-bin.sh → compile OK
  • make bootstrap-selfhost-link

Closes #2697

Made with Cursor

…pile.php AOT

bin/compile.php failed self-host AOT with a dynamic LinkerProcessPolyfill include
and an unregistered LinkerProcessPolyfill::run static call. Use a literal require
path (#54) and lower that call to the phpc_run_command builtin (#2779, #2697).

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur PurHur merged commit 22dbac2 into master May 27, 2026
@PurHur PurHur deleted the agent/selfhost-bin-compile-literal-include branch May 27, 2026 18:00
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: bin/compile.php AOT sidecar segfault — missing .m3_bin_compile_aot_blob at emit-helper link

1 participant