saghul / sjs

Skookum JS: a JavaScript runtime
http://sjs.saghul.net
MIT License
98 stars 13 forks source link

Add ability to make a static build #47

Closed saghul closed 6 years ago

saghul commented 8 years ago

Not sure how to handle dynamic modules though, what would they link with? The CLI? The embedding application?

tarkin000 commented 7 years ago

On linux, and OSX (homebrew? not XCode, at any rate) you simply compile the application with -rdynamic in CFLAGS, or -export-dynamic in LDFLAGS (gcc and ld flags, respectively). This exports all symbols, so that when dynamic libraries are loaded, they transparently bind to the application.

saghul commented 6 years ago

This is now the default. In addition, the executable is already built with -rdynamic, since CMake defaults to that.