Avoid setting EM_CACHE unless we really need to (#797)

This avoid polluting the global environment which makes
side-by-side installational of different emscripten version
harder.

See https://github.com/emscripten-core/emscripten/pull/13954
This commit is contained in:
Sam Clegg
2021-04-26 06:29:01 -07:00
committed by GitHub
parent cee96f8054
commit 4282d5d44b
4 changed files with 28 additions and 20 deletions

View File

@@ -12,12 +12,6 @@ MACOS = sys.platform == 'darwin'
assert 'EM_CONFIG' in os.environ, "emsdk should be activated before running this script"
# Remove the EM_CACHE environment variable. It interferes with testing since
# it would otherwise be fixed for the duration of the script and we expect
# "emsdk activate" to be able switch between SDKs during the running of this
# script.
del os.environ['EM_CACHE']
emconfig = os.environ['EM_CONFIG']
upstream_emcc = os.path.join('upstream', 'emscripten', 'emcc')
fastcomp_emcc = os.path.join('fastcomp', 'emscripten', 'emcc')