aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2011-12-05 10:02:01 -0800
committerAlon Zakai <alonzakai@gmail.com>2011-12-05 10:02:01 -0800
commitfa5f02ebd422ce69802f1d30406bf28ea87de357 (patch)
tree238b41071925fb761d7d138f8b91fcbac5631286
parent08e7619a88c246baf022a9cfdeafc21db068b9d0 (diff)
accept either JS_ENGINE or JS_ENGINES in ~/.emscripten
-rw-r--r--tools/shared.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/shared.py b/tools/shared.py
index 4def2cee..de52f95f 100644
--- a/tools/shared.py
+++ b/tools/shared.py
@@ -34,6 +34,17 @@ EXEC_LLVM = path_from_root('tools', 'exec_llvm.py')
VARIABLE_ELIMINATOR = path_from_root('tools', 'eliminator', 'eliminator.coffee')
JS_OPTIMIZER = path_from_root('tools', 'js-optimizer.js')
+# ~/.emscripten stuff
+
+try:
+ JS_ENGINES
+except:
+ try:
+ JS_ENGINES = [JS_ENGINE]
+ except Exception, e:
+ print 'ERROR: ~/.emscripten does not seem to have JS_ENGINES or JS_ENGINE set up'
+ raise
+
# Additional compiler options
try: