chapel-lang/chapel — pull request #945 by safl (2014-12-02 02:41:45+00:00)
Title: Added "library-mode" / CHPL_LIBMODE for compiling Chapel into (shared) libraries.

* Split runtime initialization into chpl_rt_init / chpl_rt_finalize.
* Added functions:
- chpl_library_init / chpl_library_finalize used by libraries to
initialize / finalize runtime.
- chpl_executable_init / chpl_executable_finalize used by executables
to initialize/finalize runtime.
* Makefile check for CHPL_LIBMODE=shared, adding "-fPIC" flag for runtime.

Most of the code that was previously runtime/src/main.c is now in runtime/src/chpl-init.c, primarily most of what used to be "main(...)" is now "chpl_rt_init(...)".

Most of what used to "chpl_main" is now in "chpl_std_module_init", also "chpl_main" is no more, instead "chpl_executable_init" is used by "main(...)".