How to dynamically link? #23246
-
Facebook's Static Hermes compiles JavaScript to a standalone ELF. When compiling the emitted C to that standalone native executable dynamic linking is used
How do I dynamically link using LLVM |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 9 replies
-
Emscripten does support dynamic linking in the form of the However unless you application absolutely requires it I would try to instead build without dyanmic linking and link statically. This will almost always be preferable and will result in smaller and faster code on the web. In other words I would first try to modify the hermes build scripts to avoid dynamic linking when targeting emscripten. |
Beta Was this translation helpful? Give feedback.
-
@sbc100 Any idea how I can create the
|
Beta Was this translation helpful? Give feedback.
Emscripten does support dynamic linking in the form of the
-sMAIN_MODULE
and-sSIDE_MODULE
settings. See https://emscripten.org/docs/compiling/Dynamic-Linking.html.However unless you application absolutely requires it I would try to instead build without dyanmic linking and link statically. This will almost always be preferable and will result in smaller and faster code on the web.
In other words I would first try to modify the hermes build scripts to avoid dynamic linking when targeting emscripten.