1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-02-01 05:01:59 +01:00

[gn build] Use print_function in write_cmake_config.py

No behavior change, just makes the script match the other scripts in
llvm/utils/gn/build.

Differential Revision: https://reviews.llvm.org/D55183

llvm-svn: 348190
This commit is contained in:
Nico Weber 2018-12-03 21:10:19 +00:00
parent 88d6faf35d
commit 58ab0bcce6

View File

@ -32,6 +32,8 @@ Fails if any of the KEY=VALUE arguments aren't needed for processing the
processing all values.
"""
from __future__ import print_function
import argparse
import os
import re
@ -82,15 +84,15 @@ def main():
out_lines.append(in_line)
if unused_values:
print >>sys.stderr, 'Unused --values args:'
print >>sys.stderr, ' ', '\n '.join(unused_values)
print('unused values args:', file=sys.stderr)
print(' ', '\n '.join(unused_values), file=sys.stderr)
return 1
output = ''.join(out_lines)
leftovers = var_re.findall(output)
if leftovers:
print >>sys.stderr, 'unprocessed values:\n', '\n'.join(leftovers)
print('unprocessed values:\n', '\n'.join(leftovers), file=sys.stderr)
return 1
if not os.path.exists(args.output) or open(args.output).read() != output: