diff options
author | Alon Zakai <alonzakai@gmail.com> | 2011-12-05 14:09:46 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2011-12-05 14:09:46 -0800 |
commit | d2f91efe1fcf98f59a8d142880e1910ddd2ff726 (patch) | |
tree | e4ba34462a7aba9e8073188cc1ac02e93cf8eae7 /src/settings.js | |
parent | 60a4cbdba470cb5e7500d9155fbbff9167c5094a (diff) |
partial support for runtime linking of separately-compiled modules (only functions)
Diffstat (limited to 'src/settings.js')
-rw-r--r-- | src/settings.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/settings.js b/src/settings.js index 66762298..9dba6a24 100644 --- a/src/settings.js +++ b/src/settings.js @@ -172,6 +172,17 @@ var SHOW_LABELS = 0; // Show labels in the generated code var BUILD_AS_SHARED_LIB = 0; // Whether to build the code as a shared library, which // must be loaded dynamically using dlopen(). + // 0 here means this is not a shared lib: It is a main file. + // 1 means this is a normal shared lib. + // 2 means this is a shared lib that will be linked at runtime, + // which means it will insert its functions into + // the global namespace. See STATIC_LIBS_TO_LOAD. Note + // that only functions are exported, not globals, since + // in a naive implementation they can easily override main's + // symbols (for example, the global strings, _str1 etc.). +var RUNTIME_LINKED_LIBS = []; // If this is a main file (BUILD_AS_SHARED_LIB == 0), then + // we will link these at runtime. They must have been built with + // BUILD_AS_SHARED_LIB == 2. var RUNTIME_TYPE_INFO = 0; // Whether to expose type info to the script at run time. This // increases the size of the generated script, but allows you |