summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2018-12-03 21:10:19 +0000
committerNico Weber <nicolasweber@gmx.de>2018-12-03 21:10:19 +0000
commit660f9c943ff34c3e30708e848407961b462c070d (patch)
tree7b38386804831f3006915774ce51fd16b5bc6888
parent91f9c9cd7af2f6b4ab2d966252646ed438d086f2 (diff)
downloadbcm5719-llvm-660f9c943ff34c3e30708e848407961b462c070d.tar.gz
bcm5719-llvm-660f9c943ff34c3e30708e848407961b462c070d.zip
[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
-rwxr-xr-xllvm/utils/gn/build/write_cmake_config.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/llvm/utils/gn/build/write_cmake_config.py b/llvm/utils/gn/build/write_cmake_config.py
index 744fe66fc9c..cef2116efd1 100755
--- a/llvm/utils/gn/build/write_cmake_config.py
+++ b/llvm/utils/gn/build/write_cmake_config.py
@@ -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:
OpenPOWER on IntegriCloud