Skip to content

Self-host M4: promote lib/AOT/Linker.php in spine smoke (deferred native-link, #2134 post-link) #2514

Closed

Description

@PurHur

Milestone

M2/M5 — honest native execute for lib/AOT/Linker.php (parent #1492; implementation #2779)

Problem (updated May 2026)

Stale: Linker is not excluded from spine — it is require_once in compiler_lib_spine_smoke and M2 link is 717/717 ✅.

Remaining gap: honest lowering of shell_exec / link driver methods (inventory lint: 14 class methods). Spine link succeeds via PHP_COMPILER_SELFHOST_AOT stubs; M5 needs real execute or documented external-clang floor.

Scope

Path Work
lib/AOT/Linker.php shell_exec, command -v, verbose link
lib/JIT/SelfHostBuiltinPolicy.php, lib/JIT/Call/ExternalMethod.php Policy / runtime resolve
#2779 Primary implementation issue

Repro

./script/docker-exec.sh -- bash -lc 'php script/bootstrap-inventory.php --check'
# lib/AOT/Linker.php in Phase A inventory (717 files)

grep Linker.php test/selfhost/compiler_lib_spine_smoke/main.php
# require_once present

./script/docker-exec.sh -- bash -lc 'php bin/compile.php -l lib/AOT/Linker.php'
# warnings: class methods not lowered

BOOTSTRAP_LIB_SPINE_SMOKE=1 make bootstrap-selfhost-lib-spine-smoke
# OK via stubs

Gate: M2 spine smoke ✅; M5 honest link — #2779

Done when

#2779 closes (lowering or documented external floor); this tracker closed as duplicate/superseded.

Dependencies

Epic #1492

Activity

  1. PurHur commented on May 27, 2026

    @PurHur
    OwnerAuthor

    Backlog architect update (2026-05-27 harness):

    Revised repro:

    ./script/docker-exec.sh -- bash -lc '
      php script/bootstrap-spine-deferred-lib.php 2>/dev/null || grep Linker script/bootstrap-spine-deferred-lib.php
      php bin/compile.php -l lib/AOT/Linker.php 2>&1 | tail -10
    '

    Issue stays M4/M5 floor — document external clang/shell_exec policy vs promote with honest stub (#2514 scope unchanged; unblocked for evaluation).

  2. PurHur commented on May 27, 2026

    @PurHur
    OwnerAuthor

    Ground truth update (2026-05-27, master, Docker): M2 spine/link is green now.

    Repro evidence:

    ./script/docker-exec.sh -- bash -lc 'make bootstrap-selfhost-link'
    # bootstrap-selfhost-link: OK /compiler/build/selfhost
    
    ./script/docker-exec.sh -- bash -lc 'make bootstrap-inventory-check'
    # (inventory check passes; Phase A is 717/717)

    So this ticket no longer needs to wait on “M2 spine link RED due to #2573” (at least on this environment). If Linker.php is still the last deferred path, we can now scope the actual blocker by running:

    ./script/docker-exec.sh -- bash -lc 'php bin/compile.php -l lib/AOT/Linker.php'

    …and capturing the first lint/lowering error (or confirming it’s only deferred for policy reasons).

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