[llvm] e200690 - [gn build] try to make sync_source_lists_from_cmake.py py3-compatible
Nico Weber via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 14 11:36:37 PDT 2021
Author: Nico Weber
Date: 2021-04-14T14:36:29-04:00
New Revision: e2006903813849eb6e4ae2c78ff89e9277a82845
URL: https://github.com/llvm/llvm-project/commit/e2006903813849eb6e4ae2c78ff89e9277a82845
DIFF: https://github.com/llvm/llvm-project/commit/e2006903813849eb6e4ae2c78ff89e9277a82845.diff
LOG: [gn build] try to make sync_source_lists_from_cmake.py py3-compatible
Added:
Modified:
llvm/utils/gn/build/sync_source_lists_from_cmake.py
Removed:
################################################################################
diff --git a/llvm/utils/gn/build/sync_source_lists_from_cmake.py b/llvm/utils/gn/build/sync_source_lists_from_cmake.py
index 1906c2a9234f0..6326f4cb6ae03 100755
--- a/llvm/utils/gn/build/sync_source_lists_from_cmake.py
+++ b/llvm/utils/gn/build/sync_source_lists_from_cmake.py
@@ -54,7 +54,8 @@ def sync_source_lists(write):
# Use shell=True on Windows in case git is a bat file.
def git(args): subprocess.check_call(['git'] + args, shell=os.name == 'nt')
def git_out(args):
- return subprocess.check_output(['git'] + args, shell=os.name == 'nt')
+ return subprocess.check_output(['git'] + args, shell=os.name == 'nt',
+ universal_newlines=True)
gn_files = git_out(['ls-files', '*BUILD.gn']).splitlines()
# Matches e.g. | "foo.cpp",|, captures |foo| in group 1.
More information about the llvm-commits
mailing list