Skip to content

Self-host Phase D: AOT link first namespaced lib/ translation unit #540

@PurHur

Description

@PurHur

Problem

Self-host Phase A–C are green (docs/bootstrap-selfhost.md, #512#520 ✅): procedural test/bootstrap-aot/*, namespace_hello.php, class constants, native link smoke.

The compiler itself lives under namespace PHPCompiler; in lib/. #84 / #513 closed namespace parsing for small fixtures, but no issue tracks linking a real lib/ file (e.g. lib/OpCode.php or lib/Frame.php) as a native binary.

Goal

Add Phase D gate:

make bootstrap-aot-link-lib   # new target
# links one namespaced lib/*.php subset; stdout matches Zend on fixture input

Scope

Acceptance criteria

docker run --rm -i -w /compiler php-compiler:22.04-dev bash -lc '
  tar -xf - 2>/dev/null
  make bootstrap-aot-link-lib
'

Exit 0; linked binary runs without Zend for the fixture.

Verification (local / Docker only)

php script/bootstrap-inventory.php --check
php script/bootstrap-aot-lint.php
make bootstrap-aot-link-lib

Dependencies

Non-goals

Links

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions