aboutsummaryrefslogtreecommitdiff
path: root/tools/shared.py
diff options
context:
space:
mode:
authorJukka Jylänki <jujjyl@gmail.com>2013-12-13 14:39:43 +0200
committerJukka Jylänki <jujjyl@gmail.com>2013-12-13 14:39:43 +0200
commitc4ce1f71e699c32f3a50edd06c619a8dc4e768ac (patch)
tree682887e48d781669d1968eb488dbea8bb7a447f5 /tools/shared.py
parentd18b148ed4ad68b6dcff960ede701d5373678520 (diff)
Fix an issue with the --em-config cmdline option where the option was not seen by child processes spawned by emcc. To make sure all child processes see the same config file, the --em-config parameter is stored in the environment for current and child processes.
Diffstat (limited to 'tools/shared.py')
-rw-r--r--tools/shared.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/shared.py b/tools/shared.py
index e4fb7e08..ca31d39c 100644
--- a/tools/shared.py
+++ b/tools/shared.py
@@ -184,6 +184,9 @@ else:
try:
EM_CONFIG = sys.argv[sys.argv.index('--em-config')+1]
+ # Emscripten compiler spawns other processes, which can reimport shared.py, so make sure that
+ # those child processes get the same configuration file by setting it to the currently active environment.
+ os.environ['EM_CONFIG'] = EM_CONFIG
except:
EM_CONFIG = os.environ.get('EM_CONFIG')