Commit da128c4
committed
Default LEXBOR_STATIC in bundled lexbor for Windows static builds
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.
Default LEXBOR_STATIC at the top of the vendored def.h so the
PHP-bundled copy is always static-API regardless of consumer. The
existing #ifndef-guarded block below this addition is preserved
verbatim so the change is functionally a no-op for callers that
already set LEXBOR_STATIC explicitly.
This is a vendor patch to a copy of upstream lexbor and will need to
be re-applied on the next lexbor upgrade (most recent was v2.7.0 per
8.5.6 NEWS); the patch is three lines and intentionally adjacent to
the existing LEXBOR_STATIC handling so it is unlikely to drift.1 parent 7260b27 commit da128c4
2 files changed
Lines changed: 13 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 | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
35 | 43 | | |
36 | 44 | | |
37 | 45 | | |
| |||
0 commit comments