diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-01-10 22:41:17 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-01-10 22:41:17 -0800 |
commit | 7b7f8f4d66918d306654dd711ffb44d3137fa7bb (patch) | |
tree | e4b31aa3d86e7492acf4dce16adf7a2d87230743 | |
parent | 1fb4ccc1ef28e118fe57104252330f6e452e27ef (diff) |
option for NODE_JS_SAFE as a workaround for intermittent failures due to node issue 2476
-rw-r--r-- | tools/shared.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/shared.py b/tools/shared.py index f919bc8c..0276726c 100644 --- a/tools/shared.py +++ b/tools/shared.py @@ -136,6 +136,12 @@ except: print 'ERROR: ~/.emscripten does not seem to have JS_ENGINES or JS_ENGINE set up' raise +try: + NODE_JS_SAFE # Workaround for node issue 2476. Use node trunk as NODE_JS_SAFE, it is slower, but it doesn't suffer from that bug. + # Define NODE_JS_SAFE in ~/.emscripten to use that workaround +except: + NODE_JS_SAFE = NODE_JS + # Additional compiler options try: @@ -615,7 +621,7 @@ class Building: if type(passes) == str: passes = [passes] - output, err = Popen([NODE_JS, JS_OPTIMIZER, filename] + passes, stdin=PIPE, stdout=PIPE, stderr=PIPE).communicate() + output, err = Popen([NODE_JS_SAFE, JS_OPTIMIZER, filename] + passes, stdin=PIPE, stdout=PIPE, stderr=PIPE).communicate() assert len(output) > 0 and not output.startswith('Assertion failed'), 'Error in js optimizer: ' + err + '\n\n' + output filename += '.jo.js' f = open(filename, 'w') |