aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-02-26 15:16:35 -0500
committerAlon Zakai <alonzakai@gmail.com>2013-02-26 15:16:35 -0500
commit108f6550f37ed10bef300c93f6158029471f7921 (patch)
treeca9eebdeb19517f94fe32aa31c9fc5d7e5b37868 /tools
parent556bb55f1b79f5b1420d5cf6d124631aea247a43 (diff)
do not emit EMSCRIPTEN_GENERATED_FUNCTIONS to the final output, it is just needed internally
Diffstat (limited to 'tools')
-rw-r--r--tools/js_optimizer.py2
-rw-r--r--tools/shared.py1
2 files changed, 3 insertions, 0 deletions
diff --git a/tools/js_optimizer.py b/tools/js_optimizer.py
index 69a5bb2b..52cae6e5 100644
--- a/tools/js_optimizer.py
+++ b/tools/js_optimizer.py
@@ -76,6 +76,8 @@ def run_on_js(filename, passes, js_engine, jcache):
assert gen_end > gen_start
pre = js[:gen_start]
post = js[gen_end:]
+ if 'last' in passes:
+ post = post.replace(suffix, '') # no need to write out the metadata - nothing after us needs it
js = js[gen_start:gen_end]
else:
pre = ''
diff --git a/tools/shared.py b/tools/shared.py
index 1f1016cd..d587a071 100644
--- a/tools/shared.py
+++ b/tools/shared.py
@@ -563,6 +563,7 @@ class Settings:
if opt_level >= 1:
Settings.ASSERTIONS = 0
Settings.DISABLE_EXCEPTION_CATCHING = 1
+ Settings.EMIT_GENERATED_FUNCTIONS = 1
if opt_level >= 2:
Settings.RELOOP = 1
if opt_level >= 3: