Commit 389f27f
committed
Fix module mode linking on macOS
When building a Lua C module (cdylib with the `module` feature) on
macOS, the linker fails with undefined symbols for the Lua API. This
is because macOS requires explicit `-undefined dynamic_lookup` to
allow unresolved symbols in shared libraries — unlike Linux which
permits them by default.
The build script already had platform-specific handling for Windows
(raw-dylib linking). This adds the equivalent for macOS, passing the
required linker flags so that Lua symbols are resolved at load time
from the host interpreter.
Fixes the issue reported in #625.1 parent 72824a4 commit 389f27f
1 file changed
Lines changed: 15 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
35 | 36 | | |
36 | | - | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
37 | 45 | | |
38 | 46 | | |
39 | 47 | | |
| |||
0 commit comments