summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-07-01 13:52:22 +0200
committerGitHub <noreply@github.com>2019-07-01 13:52:22 +0200
commit771aa9a779ab9d8effde70f8338a476e53c8e6d3 (patch)
treedcf0d0bd1596c3e657a97ecee1f83bb4989c8077
parent867f38a6263d40acb48fc4c9ebf038800dc63603 (diff)
parente08fa103f2be97a808c83181f1ca2fddc5c408df (diff)
Merge pull request #29482 from Calinou/html5-fix-emscripten-root
Fix Emscripten root directory detection when building for HTML5
-rw-r--r--platform/javascript/detect.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/platform/javascript/detect.py b/platform/javascript/detect.py
index 145ac42863..c6afa02c6d 100644
--- a/platform/javascript/detect.py
+++ b/platform/javascript/detect.py
@@ -69,9 +69,9 @@ def configure(env):
exec(f.read(), em_config)
except StandardError as e:
raise RuntimeError("Emscripten configuration file '%s' is invalid:\n%s" % (em_config_file, e))
- if 'EMSCRIPTEN_ROOT' not in em_config:
- raise RuntimeError("'EMSCRIPTEN_ROOT' missing in Emscripten configuration file '%s'" % em_config_file)
- env.PrependENVPath('PATH', em_config['EMSCRIPTEN_ROOT'])
+ if 'BINARYEN_ROOT' not in em_config and 'EMSCRIPTEN_ROOT' not in em_config:
+ raise RuntimeError("'BINARYEN_ROOT' or 'EMSCRIPTEN_ROOT' missing in Emscripten configuration file '%s'" % em_config_file)
+ env.PrependENVPath('PATH', em_config.get('BINARYEN_ROOT', em_config.get('EMSCRIPTEN_ROOT')))
env['CC'] = 'emcc'
env['CXX'] = 'em++'