Skip to content

M4 gen-1 link: default inventory emit driver; gen-3 argv guard (#2893, #2890)#2902

Merged
PurHur merged 1 commit into
masterfrom
issue-2893-m4-gen1-inventory-emit-driver
May 28, 2026
Merged

M4 gen-1 link: default inventory emit driver; gen-3 argv guard (#2893, #2890)#2902
PurHur merged 1 commit into
masterfrom
issue-2893-m4-gen1-inventory-emit-driver

Conversation

@PurHur
Copy link
Copy Markdown
Owner

@PurHur PurHur commented May 28, 2026

Summary

  • Default make bootstrap-loop-gen1-link to inventory compile_driver.php emit (no compile_smoke_m3_emit_native_entry.php TU); bisect via BOOTSTRAP_M3_EMIT_HELPER_TU=1.
  • Link compiler_helloworld_smoke/compile_driver.php as the inventory TU (bootstrap_loop wrapper is lint/M4 alias only); set PHP_COMPILER_M3_COMPILE_MODE=compile at runtime.
  • bin/compile.php: treat bootstrap_loop_smoke/compile_driver.php like helloworld for PHP_COMPILER_M3_EMIT_LOG_PREFIX.
  • lib/JIT.php: do not use bootstrap_loop wrapper {main} as m3CompileDriverMainBlock when inventory emit is active.
  • bootstrap-selfhost-driver-smoke.sh: stage 5 gen-3 recompile + argv emit/run (guards Self-host M4/M5: gen-3 bin/compile.php argv driver silent success (exit 0, no -o output) #2890 silent success).

Verification

make bootstrap-loop-gen1-link          # emit_path=native (inventory compile_driver)
BOOTSTRAP_M3_EMIT_HELPER_TU=1 make bootstrap-loop-gen1-link  # emit TU bisect
make bootstrap-loop-probe-dry-run
BOOTSTRAP_M5_DRIVER_SMOKE=1 make bootstrap-selfhost-driver-smoke  # includes gen-3 stage

Closes #2893. Relates to #2890, #1492.

Test plan

  • make bootstrap-loop-gen1-linkemit_path=native
  • BOOTSTRAP_M5_DRIVER_SMOKE=1 make bootstrap-selfhost-driver-smoke (gen-3 stage)
  • make bootstrap-loop-probe-dry-run
  • PHPUnit BootstrapBootstrapLoopProbeTest, BootstrapSelfhostDriverSmokeTest

Made with Cursor

…#2890)

Default bootstrap-loop-gen1-link to inventory compile_driver (no emit-helper TU),
with helloworld bundle as the link TU and M3 compile-mode env at runtime. Map
bootstrap_loop compile_driver to helloworld emit prefix in bin/compile.php; skip
wrapper {main} for m3CompileDriverMainBlock. Add gen-3 recompile+emit stage to
driver smoke to catch silent argv success.

Closes #2893. Relates to #2890, #1492.

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur PurHur merged commit 3169a48 into master May 28, 2026
@PurHur PurHur deleted the issue-2893-m4-gen1-inventory-emit-driver branch May 28, 2026 01:57
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 M4: bootstrap-loop-gen1-link default to inventory emit driver (retire compile_smoke_m3_emit_native_entry TU)

1 participant