Commit 53dbb1e
vendor-hermes: export public hermes_napi_* entry points
The clean Hermes build at the pinned SHA does NOT export
hermes_napi_create_env (and the other hermes_napi_* entry points). They are
declared in API/napi/hermes_napi.h with NAPI_EXTERN (visibility "default")
but — unlike the sibling js_native_api.h / node_api.h headers — without any
extern "C" wrapping, so they get C++ linkage. The mangled C++ symbols stay
out of the framework's dynamic export table under Hermes' global
-fvisibility=hidden, and a from-scratch build fails at the app link with
"Undefined symbol: hermes_napi_create_env".
vendor-hermes now wraps the hermes_napi.h declarations in
EXTERN_C_START / EXTERN_C_END (both available via the node_api.h include),
giving the entry points C linkage so they export under their unmangled C
names. This mirrors the upstream fix in facebook/hermes#2106. The patch is
idempotent (guarded on EXTERN_C_START) and asserts its anchors exist so a
future Hermes bump fails loudly rather than silently no-op'ing.
Also ignore **/build-tests/** in ESLint (CMake writes compiler_depend.ts
dependency files there that aren't real TypeScript).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 91f8cd1 commit 53dbb1e
2 files changed
Lines changed: 39 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
31 | 66 | | |
32 | 67 | | |
33 | 68 | | |
| |||
115 | 150 | | |
116 | 151 | | |
117 | 152 | | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
118 | 156 | | |
119 | 157 | | |
120 | 158 | | |
0 commit comments