Merge pull request #12467 from marcelofg55/emscripten_detect

Detect javascript platform using EMSCRIPTEN env as well

[ci skip]
This commit is contained in:
Rémi Verschelde 2017-10-30 11:43:03 +01:00 committed by GitHub
commit 62a3dcdc72
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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'