diff options
| author | Remko Tronçon <git@el-tramo.be> | 2014-06-07 08:27:04 (GMT) |
|---|---|---|
| committer | Remko Tronçon <git@el-tramo.be> | 2014-06-07 08:27:58 (GMT) |
| commit | 58396750ef7639701b3cd2c5c48f7e867ccfd8c7 (patch) | |
| tree | 25cd9fdc83ab97f3aab5a001185012d2318330b9 /BuildTools | |
| parent | 38d994aa83b068f93189e91fe466387759f7451b (diff) | |
| download | swift-contrib-58396750ef7639701b3cd2c5c48f7e867ccfd8c7.zip swift-contrib-58396750ef7639701b3cd2c5c48f7e867ccfd8c7.tar.bz2 | |
scons2ninja: Don't buffer SCons output
Change-Id: I6a2c485a90a988e9560f4c4af0c5d118542cfa44
Diffstat (limited to 'BuildTools')
| -rwxr-xr-x | BuildTools/scons2ninja.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/BuildTools/scons2ninja.py b/BuildTools/scons2ninja.py index 0ca3e42..a39ed32 100755 --- a/BuildTools/scons2ninja.py +++ b/BuildTools/scons2ninja.py @@ -332,71 +332,71 @@ ninja.rule('ibtool', command = '$ibtool $ibtoolflags --compile $out $in', description = 'IBTOOL $out') ninja.rule('dsymutil', command = '$dsymutil $dsymutilflags -o $out $in', description = 'DSYMUTIL $out') ninja.rule('generator', command = "python " + SCRIPT + " ${scons_args}", depfile = ".scons2ninja.deps", pool = 'scons_pool', generator = '1', description = 'Regenerating build.ninja') ninja.rule('sdef', command = 'sdef $in | sdp -fh --basename $basename -o $outdir', description = 'SDEF $out') ################################################################################ # Build Statements ################################################################################ scons_generate_cmd = scons_cmd + " " + SCONS_ARGS + " --tree=all,prune dump_trace=1" #scons_generate_cmd = 'cmd /c type scons2ninja.in' #scons_generate_cmd = 'cat scons2ninja.in' # Pass 1: Parse dependencies (and prefilter some build rules) build_lines = [] dependencies = {} mtflags = {} previous_file = None f = subprocess.Popen(scons_generate_cmd, stdout = subprocess.PIPE, stderr = subprocess.PIPE, shell=True) stage = 'preamble' skip_nth_line = -1 stack = ['.'] -for line in f.stdout.readlines() : +for line in f.stdout : line = line.rstrip() # Skip lines if requested from previous command if skip_nth_line >= 0 : skip_nth_line -= 1 if skip_nth_line == 0 : continue if line.startswith('scons: done building targets') : break if stage == "preamble" : # Pass all lines from the SCons configuration step to output if re.match("^scons: Building targets ...", line) : stage = "build" else : print line elif stage == "build" : if line.startswith('+-') : stage = "dependencies" elif re.match("^Using tempfile", line) : # Ignore response files from MSVS skip_nth_line = 2 else : build_lines.append(line) # Already detect targets that will need 'mt' tool, _, flags = parse_tool_command(line) if tool == 'mt' : target = get_unary_flags("-outputresource:", flags)[0] target = target[0:target.index(';')] mtflags[target] = flags elif stage == "dependencies" : |
Swift