Category
bootstrap
Problem
The bootstrap inventory argv driver (bin/compile.php / native AOT driver invoked from script/bootstrap-inventory.php) can exit 0 after printing a compile-OK line while never writing the -o output file (or writing zero bytes). bootstrap_inventory_argv_emit_output_ok in the bootstrap scripts guards this (#3046), but the compiler should fail loudly itself so gen-0 / M3 gates cannot pass on phantom emits.
This blocks trustworthy M3 native compile verification and hides linker/driver bugs.
php-src reference
- N/A (compiler bootstrap). Analogous to php-src build tools failing when
-o is missing after successful compile.
Repro
# After implementing the guard, this synthetic failure mode must non-zero:
# (exact trigger depends on current driver — reproduce via bootstrap inventory emit step)
BOOTSTRAP_INVENTORY_EMIT=1 php script/bootstrap-inventory.php --emit-only 2>&1 | tee /tmp/inv-emit.log
test -s /tmp/bootstrap-inventory-driver.out || echo "MISSING OUTPUT"
# Stricter: force driver with -o pointing at unwritable path / dev-null discard and assert non-zero
./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && make bootstrap-selfhost-inventory-emit-probe'
Today: driver may return success without a non-empty -o artifact; outer script catches some cases but not all native paths.
Scope (this repo)
bin/compile.php — post-compile stat on -o path (size > 0, regular file)
lib/AOT/ native driver emit path (shared helper with bin/compile.php)
script/bootstrap-inventory.php — tighten bootstrap_inventory_argv_emit_output_ok messages; keep as belt-and-suspenders
- Tests:
test/unit/BootstrapInventoryEmitTest.php — temp -o missing/empty → non-zero exit
Done when
Verify
make bootstrap-selfhost-vm-driver-execute-probe
make north-star5-verify-fast
./script/ci-fast.sh --filter BootstrapInventoryEmit
Links
Category
bootstrapProblem
The bootstrap inventory argv driver (
bin/compile.php/ native AOT driver invoked fromscript/bootstrap-inventory.php) can exit 0 after printing a compile-OK line while never writing the-ooutput file (or writing zero bytes).bootstrap_inventory_argv_emit_output_okin the bootstrap scripts guards this (#3046), but the compiler should fail loudly itself so gen-0 / M3 gates cannot pass on phantom emits.This blocks trustworthy M3 native compile verification and hides linker/driver bugs.
php-src reference
-ois missing after successful compile.Repro
Today: driver may return success without a non-empty
-oartifact; outer script catches some cases but not all native paths.Scope (this repo)
bin/compile.php— post-compile stat on-opath (size > 0, regular file)lib/AOT/native driver emit path (shared helper withbin/compile.php)script/bootstrap-inventory.php— tightenbootstrap_inventory_argv_emit_output_okmessages; keep as belt-and-suspenderstest/unit/BootstrapInventoryEmitTest.php— temp-omissing/empty → non-zero exitDone when
-omissing, empty, or not created after successful compile lineBOOTSTRAP_INVENTORY_EMIT=1probe inmake north-star5-verify-fastcannot pass with phantom emit./script/ci-fast.sh --filter BootstrapInventoryEmitgreenVerify
Links