diff options
author | Jukka Jylänki <jujjyl@gmail.com> | 2013-04-06 21:12:55 +0300 |
---|---|---|
committer | Jukka Jylänki <jujjyl@gmail.com> | 2013-04-11 10:42:14 +0300 |
commit | 1c4f763de44601a8b5a50fd5f78a8fedd314c131 (patch) | |
tree | d6f30313cdd557b0825de81f9b5d03465faeb1e9 /emscripten.py | |
parent | bc234c204c0a1d6d02363e9a60418dd52a6c3c87 (diff) |
Extend the use of response files to cover the case when emcc invokes emscripten.py, so that Windows command line length limitations don't break the test_asm_pgo on Windows.
Diffstat (limited to 'emscripten.py')
-rwxr-xr-x | emscripten.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/emscripten.py b/emscripten.py index efa6894a..02e28623 100755 --- a/emscripten.py +++ b/emscripten.py @@ -12,6 +12,7 @@ headers, for the libc implementation in JS). import os, sys, json, optparse, subprocess, re, time, multiprocessing, functools from tools import jsrun, cache as cache_module, tempfiles +from tools.response_file import read_and_delete_response_file __rootpath__ = os.path.abspath(os.path.dirname(__file__)) def path_from_root(*pathelems): @@ -629,6 +630,18 @@ def main(args, compiler_engine, cache, jcache, relooper, temp_files, DEBUG, DEBU jcache=jcache, temp_files=temp_files, DEBUG=DEBUG, DEBUG_CACHE=DEBUG_CACHE) def _main(environ): + response_file = True + while response_file: + response_file = None + for index in range(1, len(sys.argv)): + if sys.argv[index][0] == '@': + # found one, loop again next time + response_file = True + response_file_args = read_and_delete_response_file(sys.argv[index]) + # slice in extra_args in place of the response file arg + sys.argv[index:index+1] = response_file_args + break + parser = optparse.OptionParser( usage='usage: %prog [-h] [-H HEADERS] [-o OUTFILE] [-c COMPILER_ENGINE] [-s FOO=BAR]* infile', description=('You should normally never use this! Use emcc instead. ' |