aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJukka Jylänki <jujjyl@gmail.com>2014-06-07 15:00:34 +0300
committerJukka Jylänki <jujjyl@gmail.com>2014-06-07 15:00:34 +0300
commit40aeae811088d43905f2a9d12cdcced5dd07b2ad (patch)
treecd4157aa8b99725830061ddd364951e01014e008
parent4ea61a6a61360ad4d3d6363941bd0d53aadf0c7f (diff)
On Windows, properly clean up temporary .rsp response file used during the build after finished so the C:\Users\clb\AppData\Local\Temp directory doesn't litter up with .rsp files.
-rw-r--r--tools/shared.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/shared.py b/tools/shared.py
index 7aaa4136..5ef1c4ef 100644
--- a/tools/shared.py
+++ b/tools/shared.py
@@ -1426,12 +1426,17 @@ class Building:
settings = Settings.serialize()
args = settings + extra_args
if WINDOWS:
- args = ['@' + response_file.create_response_file(args, TEMP_DIR)]
+ rsp_file = response_file.create_response_file(args, TEMP_DIR)
+ args = ['@' + rsp_file]
cmdline = [PYTHON, EMSCRIPTEN, filename + ('.o.ll' if append_ext else ''), '-o', filename + '.o.js'] + args
if jsrun.TRACK_PROCESS_SPAWNS:
logging.info('Executing emscripten.py compiler with cmdline "' + ' '.join(cmdline) + '"')
jsrun.timeout_run(Popen(cmdline, stdout=PIPE), None, 'Compiling')
+ # Clean up .rsp file the compiler used after we are finished.
+ if WINDOWS:
+ try_delete(rsp_file)
+
# Detect compilation crashes and errors
assert os.path.exists(filename + '.o.js'), 'Emscripten failed to generate .js'