Skip to content

Commit

Permalink
gn build: Make cmake sync script work on Windows if git is a bat file
Browse files Browse the repository at this point in the history
Differential Revision: https://reviews.llvm.org/D57338

llvm-svn: 352419
  • Loading branch information
nico committed Jan 28, 2019
1 parent c49428a commit 3d4f49f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions llvm/utils/gn/build/sync_source_lists_from_cmake.py
Expand Up @@ -18,8 +18,9 @@


def sync_source_lists():
gn_files = subprocess.check_output(
['git', 'ls-files', '*BUILD.gn']).splitlines()
# Use shell=True on Windows in case git is a bat file.
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)
Expand Down

0 comments on commit 3d4f49f

Please sign in to comment.