You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 2cf40d2
Browse filesBrowse the repository at this point in the historyBrowse files
turbo-ext: build the shared core and the per-version extension with make SPLIT=1
`make SPLIT=1` builds phpstan_turbo_core.so (everything but the four
version-specific sources) and a phpstan_turbo.so linked against it, which
finds it next to itself ($ORIGIN, @loader_path); `make SPLIT=1 extension`
links only the extension against a core already in place, which is what a
per-PHP-version CI leg does. `make pgo` and `make strip` handle the pair; a
plain `make` (and the phpize build) still produce the one self-contained
extension.
The boundary is functions only — pt_abi, pt_globals and pt_type_op_infos
are reached through accessors from the version-specific side, since a
Windows DLL can delay-load functions but not data — and main.cpp is
version-specific like Abi/Shadow/TrustedTypes. The extension refuses a
core of another version: it registers nothing and reports "core-mismatch",
which TurboExtensionEnabler rejects. On Windows it loads the core from its
own directory in get_module() (PHP loads extensions with plain
LoadLibrary, which would search the application's directory instead), and
zend_is_true() goes through pt_abi there (no assembler names on MSVC).
Verified in the CI images: a PGO+LTO core built in the 8.5 image (6.73 MB
stripped) with extensions built against it in the 8.3, 8.4, 8.6 and 8.6
ZTS images (68 KB each): smoke.php ALL OK on each; a version-mismatched
pair reports core-mismatch and stays inactive. macOS: the same via make
SPLIT=1, ALL OK on 8.5.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017h1GfB7vfJPgwcTHD9Fth6
0 commit comments