Skip to content

Commit e5c5e62

Browse files
committed
[gn] Make sync script sync .mm files too
Motivated by #129332, which added a new .mm file that didn't get autosynced.
1 parent 94c937d commit e5c5e62

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

llvm/utils/gn/build/sync_source_lists_from_cmake.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,13 @@ def git_out(args):
6161
gn_files = git_out(["ls-files", "*BUILD.gn"]).splitlines()
6262

6363
# Matches e.g. | "foo.cpp",|, captures |foo| in group 1.
64-
gn_cpp_re = re.compile(r'^\s*"([^$"]+\.(?:cpp|c|h|S))",$', re.MULTILINE)
64+
gn_cpp_re = re.compile(r'^\s*"([^$"]+\.(?:cpp|c|h|mm|S))",$', re.MULTILINE)
6565
# Matches e.g. | bar_sources = [ "foo.cpp" ]|, captures |foo| in group 1.
6666
gn_cpp_re2 = re.compile(
67-
r'^\s*(?:.*_)?sources \+?= \[ "([^$"]+\.(?:cpp|c|h|S))" ]$', re.MULTILINE
67+
r'^\s*(?:.*_)?sources \+?= \[ "([^$"]+\.(?:cpp|c|h|mm|S))" ]$', re.MULTILINE
6868
)
6969
# Matches e.g. | foo.cpp|, captures |foo| in group 1.
70-
cmake_cpp_re = re.compile(r"^\s*([A-Za-z_0-9./-]+\.(?:cpp|c|h|S))$", re.MULTILINE)
70+
cmake_cpp_re = re.compile(r"^\s*([A-Za-z_0-9./-]+\.(?:cpp|c|h|mm|S))$", re.MULTILINE)
7171

7272
changes_by_rev = defaultdict(lambda: defaultdict(lambda: defaultdict(list)))
7373

0 commit comments

Comments
 (0)