Commit 713a5e3
authored
[JS] Remove extra files from package (#138)
Make the package smaller.
Fix CI issues:
rust-lang/rust#131477
The PR doesn't directly mention undefined N-API symbols. But the fact
that the runner image updated Rust from 1.90 to 1.91,
and that's when the linking failures started, is compelling evidence.
The fix I added (the -undefined dynamic_lookup flags) is
the correct solution regardless - it's been the standard approach for
N-API addons on macOS for years.
Why the linker flags are now needed:
1. GitHub Actions runner image update: The macos-15-arm64 runner image
was updated from version 20251021.0066 (used in Oct 26
successful build) to 20251104.0104 (used in Nov 7 failed builds)
2. Rust version upgrade: The runner image update included Rust 1.90.0 →
1.91.0
3. Rust 1.91 macOS linking changes: Rust 1.91
rust-lang/rust#131477 via the SDKROOT
environment
variable. This appears to have made the linker stricter about undefined
symbols in cdylibs.
4. The fix: Adding -undefined dynamic_lookup linker flags for macOS
targets is the standard solution for N-API native addons,
as these symbols are intentionally undefined and resolved at runtime by
Node.js. The flags tell the macOS linker to allow
these undefined symbols.1 parent 7b02bfd commit 713a5e3
File tree
4 files changed
+42
-8
lines changed- .github/workflows
- js/optify-config
- .cargo
4 files changed
+42
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
| 47 | + | |
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
| |||
78 | 79 | | |
79 | 80 | | |
80 | 81 | | |
81 | | - | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
82 | 85 | | |
83 | 86 | | |
84 | 87 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | | - | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
| 4 | + | |
3 | 5 | | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
4 | 11 | | |
5 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
6 | 16 | | |
7 | 17 | | |
8 | | - | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
9 | 22 | | |
10 | | - | |
11 | 23 | | |
| 24 | + | |
| 25 | + | |
12 | 26 | | |
13 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
0 commit comments