summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2017-10-30 11:43:03 +0100
committerGitHub <noreply@github.com>2017-10-30 11:43:03 +0100
commit62a3dcdc72be939c5b8a31d035bce5a576397fb4 (patch)
tree20a31825bb077df79832780d7814f3f04cc6dedb /platform
parent80427c1aa2c271ecf172ab1a41df3b75d31a2052 (diff)
parent33daf4d8bc17f30c85cefe2e9dfe9b46ddb257f9 (diff)
Merge pull request #12467 from marcelofg55/emscripten_detect
Detect javascript platform using EMSCRIPTEN env as well [ci skip]
Diffstat (limited to 'platform')
-rw-r--r--platform/javascript/detect.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/platform/javascript/detect.py b/platform/javascript/detect.py
index cc29ad8956..a2988d9c60 100644
--- a/platform/javascript/detect.py
+++ b/platform/javascript/detect.py
@@ -13,7 +13,7 @@ def get_name():
def can_build():
- return ("EMSCRIPTEN_ROOT" in os.environ)
+ return ("EMSCRIPTEN_ROOT" in os.environ or "EMSCRIPTEN" in os.environ)
def get_opts():
@@ -66,7 +66,10 @@ def configure(env):
## Compiler configuration
env['ENV'] = os.environ
- env.PrependENVPath('PATH', os.environ['EMSCRIPTEN_ROOT'])
+ if ("EMSCRIPTEN_ROOT" in os.environ):
+ env.PrependENVPath('PATH', os.environ['EMSCRIPTEN_ROOT'])
+ elif ("EMSCRIPTEN" in os.environ):
+ env.PrependENVPath('PATH', os.environ['EMSCRIPTEN'])
env['CC'] = 'emcc'
env['CXX'] = 'em++'
env['LINK'] = 'emcc'