AOT Docker: bundle libjansson for ld, fix CFG branches, add HelloWorld PHPT#239
Merged
Conversation
Bundle libjansson for the LLVM 9 linker, detect empty bind-mounts in docker-ci-local.sh, branch from the current insert block after inline builtins, and add a HelloWorld AOT PHPT fixture. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
script/install-llvm9.shnow bundleslibjansson.so.4(required by the Debian binutilsldpulled into.llvm/). The Ubuntu 22.04 dev image also installslibjansson4via apt.script/docker-ci-local.shverifies the bind-mount is non-empty before using it; otherwise it falls through to the existing tar-pipe path (Runforge workspaces).TYPE_JUMP/TYPE_JUMPIF/TYPE_RETURN*emit terminators on the current insert block instead of the CFG block’s original LLVM BB, so inline builtins (e.g.array_pop) do not leave merge blocks without terminators.test/fixtures/aot/cases/hello_world_example.phpt(matchesexamples/000-HelloWorld).Test output (local Docker,
php-compiler:22.04-dev)Harness host (bind-mount empty); repo copied via tar:
Before this PR: all 42 AOT tests failed at link time:
After this PR:
test/aot/now compile, link, and run (includingExampleWebAotTest,StdlibWebBuiltinsTest,hello_world_example.phpt).array_key_exists_get,array_pop,boolval,empty,explode,getenv_missing,str_ends_with,str_starts_with— LLVM verify:Basic Block ... does not have terminatoronblock_1orarray_pop_done*.Full local CI on harness:
./script/docker-ci-local.sh # or: make test-docker # after make docker-build-22 if Dockerfile changedFollow-up
JUMPIFCFG layout (8 PHPTs above).php-compiler:22.04-dev/ghcr.io/PurHur/php-compiler:devwithlibjansson4in the image layer.Made with Cursor