Category
Foundation: · build architecture · child of #36188 · respin of #36198 (closed by PR #36238, which delivered part A only: per-function .text.<symbol> sections + --gc-sections + -s)
Problem
PR #36238's own summary: "Part B (shared common.o runtime prologue) and helper-cache refresh remain follow-ups — committed prelinked unit.o files still use monolithic .text until re-emitted." So today: every committed unit.o still embeds ~462 duplicate runtime symbols (prelinked/helper-runtime/x86_64-linux/units/ext_ctype_CtypeJitHelper_php/unit.o = 1.65 MB for 2 exported helpers), the cache is 446 units / 790 MB in git (.git 6.6 GB), and --gc-sections can only drop bodies from objects that have per-function sections — i.e. none of the committed ones.
PHP implementation target
- Re-emit the helper corpus with
AotGcSections active (emit-helper-runtime-object.php --prelink) so the committed units carry .text.<fn> sections; record hello-world size before/after.
- Emit the shared runtime (
__value__*, __string__*, __hashtable__*, __ref__*, memory manager, GC) once as prelinked/helper-runtime/<arch>/common.o; lower units with those functions as declarations (HelperRuntimeCache::declareExternFromBitcode path); fingerprint common.o with the units; keep the class-id/ABI hazard (emit-helper-runtime-object.php:353-357) in mind.
- Publish the per-arch cache as a release tarball fetched by
core_fingerprint/llvm_identity_token; keep only manifests in git; offline fallback = local emit.
Done when
Category
Foundation:· build architecture · child of #36188 · respin of #36198 (closed by PR #36238, which delivered part A only: per-function.text.<symbol>sections +--gc-sections+-s)Problem
PR #36238's own summary: "Part B (shared
common.oruntime prologue) and helper-cache refresh remain follow-ups — committed prelinkedunit.ofiles still use monolithic.textuntil re-emitted." So today: every committedunit.ostill embeds ~462 duplicate runtime symbols (prelinked/helper-runtime/x86_64-linux/units/ext_ctype_CtypeJitHelper_php/unit.o= 1.65 MB for 2 exported helpers), the cache is 446 units / 790 MB in git (.git6.6 GB), and--gc-sectionscan only drop bodies from objects that have per-function sections — i.e. none of the committed ones.PHP implementation target
AotGcSectionsactive (emit-helper-runtime-object.php --prelink) so the committed units carry.text.<fn>sections; record hello-world size before/after.__value__*,__string__*,__hashtable__*,__ref__*, memory manager, GC) once asprelinked/helper-runtime/<arch>/common.o; lower units with those functions as declarations (HelperRuntimeCache::declareExternFromBitcodepath); fingerprintcommon.owith the units; keep the class-id/ABI hazard (emit-helper-runtime-object.php:353-357) in mind.core_fingerprint/llvm_identity_token; keep only manifests in git; offline fallback = local emit.Done when
unit.o< 100 KB; hello-world stripped binary < 3 MB;script/aot-smoke.shbyte-identical output; AOT sweep unchangedgit ls-files prelinked/helper-runtime | grep -c '\.o$'= 0; fresh clone < 500 MB; cold hello-world build time unchanged after fetch