diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-01-18 18:10:57 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-01-18 18:10:57 -0800 |
commit | f6be80cbd7bd9e339da7ad5829e98c2f16ee2b1b (patch) | |
tree | 1cc8181051d00daa05736213f50fd4c441cbdc49 /src/settings.js | |
parent | dfca41cfde20eb47a38ae83b1d7dd80da669232f (diff) |
LINKABLE options, disabling dead code elimination for shared libraries and main files that have things that shared libraries will access through an extern
Diffstat (limited to 'src/settings.js')
-rw-r--r-- | src/settings.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/settings.js b/src/settings.js index 1d62cbbf..7e900ea9 100644 --- a/src/settings.js +++ b/src/settings.js @@ -194,6 +194,16 @@ var RUNTIME_LINKED_LIBS = []; // If this is a main file (BUILD_AS_SHARED_LIB == // BUILD_AS_SHARED_LIB == 2. // NOTE: LLVM optimizations run separately on the main file and // linked libraries can break things. +var LINKABLE = 0; // If set to 1, this file can be linked with others, either as a shared + // library or as the main file that calls a shared library. To enable that, + // we will not internalize all symbols and cull the unused ones, in other + // words, we will not remove unused functions and globals, which might be + // used by another module we are linked with. + // BUILD_AS_SHARED_LIB > 0 implies this, so it is only importand to set this to 1 + // when building the main file, and *if* that main file has symbols that + // the library it will open will then access through an extern. + // LINKABLE of 0 is very useful in that we can reduce the size of the + // generated code very significantly, by removing everything not actually used. 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 |