Commit 5521f86
committed
Define LEXBOR_STATIC in ext/lexbor/config.w32 for static linkage
PHP bundles lexbor as a static-only extension (ext/lexbor/config.w32
declares EXTENSION("lexbor", ..., false /* never shared */)). On
Windows, ext/lexbor/lexbor/core/def.h defaults LXB_API to
__declspec(dllimport) when LEXBOR_STATIC is not defined, which causes
LNK2019 unresolved external symbol errors for every lxb_* function
referenced from consumers (ext/uri today, potentially others later)
when PHP itself is linked statically without a runtime DLL.
Add AC_DEFINE("LEXBOR_STATIC", 1, ...) in ext/lexbor/config.w32 so
the symbol is placed in main/config.w.h and seen by every PHP source
file that includes php.h before lexbor headers. This covers ext/uri
and any future consumer with one definition, in the right place for
configuration intent.
This change lives entirely in PHP-owned configuration (no modification
to the vendored ext/lexbor/lexbor/ tree), so it survives lexbor library
upgrades without re-application.1 parent 7260b27 commit 5521f86
2 files changed
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
9 | 14 | | |
10 | 15 | | |
11 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
30 | 37 | | |
0 commit comments