Merge: nitc: intro hidden option to compile to a shared native lib (.so/.dll)
authorJean Privat <jean@pryen.org>
Fri, 8 Jun 2018 22:42:35 +0000 (18:42 -0400)
committerJean Privat <jean@pryen.org>
Fri, 8 Jun 2018 22:42:35 +0000 (18:42 -0400)
Add the `--shared-lib` command line option for `nitc` to generate a native library (.so or .dll). It is hidden because by itself it is not very useful. This is a first step to create polyglot programs where Nit is not the entrypoing.

I currently use such a DLL by first calling `nit_main` and then invoking callbacks generated by the FFI for a dummy method. Once we have a better way to generate the callbacks (or entrypoint actually) and maybe generate a .h, we could make this an official feature.

Pull-Request: #2714
Reviewed-by: Jean Privat <jean@pryen.org>

1  2 
src/compiler/abstract_compiler.nit

Simple merge