aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rwxr-xr-xtools/bindings_generator.py5
-rw-r--r--tools/js_optimizer.py2
-rw-r--r--tools/settings_template_readonly.py3
-rw-r--r--tools/shared.py6
4 files changed, 12 insertions, 4 deletions
diff --git a/tools/bindings_generator.py b/tools/bindings_generator.py
index d2c165a2..d610ab54 100755
--- a/tools/bindings_generator.py
+++ b/tools/bindings_generator.py
@@ -62,6 +62,10 @@ Notes:
string on the *stack*. The C string will live for the current
function call. If you need it for longer, you need to create a copy
in your C++ code.
+
+ * You should compile with -s EXPORT_BINDINGS=1 in order for the
+ autogenerated bindings functions to be exported. This is necessary
+ when compiling in asm.js mode.
'''
import os, sys, glob, re
@@ -464,6 +468,7 @@ Module['getClass'] = getClass;
function customizeVTable(object, replacementPairs) {
// Does not handle multiple inheritance
+ // Does not work with asm.js
// Find out vtable size
var vTable = getValue(object.ptr, 'void*');
diff --git a/tools/js_optimizer.py b/tools/js_optimizer.py
index 87fd0660..1f1c1354 100644
--- a/tools/js_optimizer.py
+++ b/tools/js_optimizer.py
@@ -154,7 +154,7 @@ def run_on_js(filename, passes, js_engine, jcache):
class Finals:
buf = []
def process(line):
- if len(line) > 0 and (line.startswith('Module[') or line.endswith('["X"]=1;')):
+ if len(line) > 0 and (line.startswith(('Module[', 'if (globalScope)')) or line.endswith('["X"]=1;')):
Finals.buf.append(line)
return False
return True
diff --git a/tools/settings_template_readonly.py b/tools/settings_template_readonly.py
index f689e205..7ab89b48 100644
--- a/tools/settings_template_readonly.py
+++ b/tools/settings_template_readonly.py
@@ -11,8 +11,7 @@ PYTHON = os.path.expanduser(os.getenv('PYTHON') or '{{{ PYTHON }}}') # executabl
# See below for notes on which JS engine(s) you need
NODE_JS = os.path.expanduser(os.getenv('NODE') or '{{{ NODE }}}') # executable
-SPIDERMONKEY_ENGINE = [
- os.path.expanduser(os.getenv('SPIDERMONKEY') or 'js'), '-m', '-n'] # executable
+SPIDERMONKEY_ENGINE = [os.path.expanduser(os.getenv('SPIDERMONKEY') or 'js')] # executable
V8_ENGINE = os.path.expanduser(os.getenv('V8') or 'd8') # executable
JAVA = 'java' # executable
diff --git a/tools/shared.py b/tools/shared.py
index 34ed9b3d..3d0f90b9 100644
--- a/tools/shared.py
+++ b/tools/shared.py
@@ -181,7 +181,7 @@ def check_node_version():
# we re-check sanity when the settings are changed)
# We also re-check sanity and clear the cache when the version changes
-EMSCRIPTEN_VERSION = '1.3.0'
+EMSCRIPTEN_VERSION = '1.3.1'
def check_sanity(force=False):
try:
@@ -1141,6 +1141,9 @@ set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)''' % { 'winfix': '' if not WINDOWS e
print >> sys.stderr, 'bootstrapping relooper...'
os.chdir(path_from_root('src'))
+ emcc_debug = os.environ.get('EMCC_DEBUG')
+ if emcc_debug: del os.environ['EMCC_DEBUG']
+
def make(opt_level):
raw = relooper + '.raw.js'
Building.emcc(os.path.join('relooper', 'Relooper.cpp'), ['-I' + os.path.join('relooper'), '--post-js',
@@ -1169,6 +1172,7 @@ set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)''' % { 'winfix': '' if not WINDOWS e
ok = True
finally:
os.chdir(curr)
+ if emcc_debug: os.environ['EMCC_DEBUG'] = emcc_debug
if not ok:
print >> sys.stderr, 'bootstrapping relooper failed. You may need to manually create relooper.js by compiling it, see src/relooper/emscripten'
1/0