[PATCH] D57338: gn build: Make cmake sync script work on Windows if git is a bat file

Nico Weber via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 28 09:25:30 PST 2019


thakis created this revision.
thakis added reviewers: pcc, phosek.
Herald added a subscriber: mgorny.
Herald added a reviewer: serge-sans-paille.

https://reviews.llvm.org/D57338

Files:
  llvm/utils/gn/build/sync_source_lists_from_cmake.py


Index: llvm/utils/gn/build/sync_source_lists_from_cmake.py
===================================================================
--- llvm/utils/gn/build/sync_source_lists_from_cmake.py
+++ llvm/utils/gn/build/sync_source_lists_from_cmake.py
@@ -18,8 +18,8 @@
 
 
 def sync_source_lists():
-    gn_files = subprocess.check_output(
-            ['git', 'ls-files', '*BUILD.gn']).splitlines()
+    gn_files = subprocess.check_output(['git', 'ls-files', '*BUILD.gn'],
+                                       shell=os.name == 'nt').splitlines()
 
     # Matches e.g. |   "foo.cpp",|, captures |foo| in group 1.
     gn_cpp_re = re.compile(r'^\s*"([^"]+\.(?:cpp|h))",$', re.MULTILINE)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D57338.183890.patch
Type: text/x-patch
Size: 677 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190128/22af17c7/attachment.bin>


More information about the llvm-commits mailing list