aboutsummaryrefslogtreecommitdiff
path: root/emcc
diff options
context:
space:
mode:
Diffstat (limited to 'emcc')
-rwxr-xr-xemcc10
1 files changed, 10 insertions, 0 deletions
diff --git a/emcc b/emcc
index 75750e1e..c6b0893b 100755
--- a/emcc
+++ b/emcc
@@ -1066,6 +1066,16 @@ try:
logging.warning('disabling LLVM optimizations, need typed arrays mode 2 for them')
llvm_opts = 0
+ if shared.Settings.MAIN_MODULE:
+ assert not shared.Settings.SIDE_MODULE
+ shared.Settings.INCLUDE_FULL_LIBRARY = 1
+ shared.Settings.LINKABLE = 1 # TODO: add FORCE_DCE option for the brave people that do want to dce here and in side modules
+ debug_level = max(debug_level, 2) # preserve function names
+ elif shared.Settings.SIDE_MODULE:
+ assert not shared.Settings.MAIN_MODULE
+ shared.Settings.LINKABLE = 1
+ debug_level = max(debug_level, 2)
+
## Compile source code to bitcode
logging.debug('compiling to bitcode')