Commit 27371fa
authored
Fix Windows --nano build: include entry declaration header in extension TU (#134)
On Windows, --nano runs in nano-policy mode (nanoMode=false, nanoPolicyMode=true)
using the WINDOWS_DLL backend. RINIT then emits a direct C++ call to php_main()
instead of relying on ZendVM eval, but the extension translation unit never
included the entry function's declaration header, so the php_main() prototype
was missing and MSVC failed with C3861.
genExtensionIncludeHeaderFiles() only added declaration headers for stub files
and attribute-factory owners, never the entry's source file. Include the entry
function's declaration header when nano-policy mode is active so php_main() is
visible where RINIT references it.
Verified: a minimal --nano program now compiles, links and runs on Windows
(previously failed at extension-<target>.cc with 'php_main': identifier not
found).1 parent 8b33cad commit 27371fa
1 file changed
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3535 | 3535 | | |
3536 | 3536 | | |
3537 | 3537 | | |
| 3538 | + | |
| 3539 | + | |
| 3540 | + | |
| 3541 | + | |
| 3542 | + | |
| 3543 | + | |
| 3544 | + | |
| 3545 | + | |
| 3546 | + | |
| 3547 | + | |
| 3548 | + | |
| 3549 | + | |
| 3550 | + | |
| 3551 | + | |
3538 | 3552 | | |
3539 | 3553 | | |
3540 | 3554 | | |
| |||
0 commit comments