diff options
author | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2019-06-04 18:45:49 +0200 |
---|---|---|
committer | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2019-06-19 22:23:58 +0200 |
commit | e08fa103f2be97a808c83181f1ca2fddc5c408df (patch) | |
tree | 0a2517955180decfc6b6dad544b3f2e54cf27b4c | |
parent | e22dde1b18657158510cead4fd3c202045640935 (diff) |
Fix Emscripten root directory detection when building for HTML5
Recent Emscripten SDK versions seem to only include the
`BINARYEN_ROOT` variable in the Emscripten configuration file,
whereas the platform's `detect.py` only looked at `EMSCRIPTEN_ROOT`.
-rw-r--r-- | platform/javascript/detect.py | 6 |
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++' |