[llvm] 9b346f9 - [gn build] Do not sync filenames containing variable references

Nico Weber via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 18 12:34:41 PDT 2020


Author: Nico Weber
Date: 2020-09-18T15:34:33-04:00
New Revision: 9b346f974ea606e17064969568568da30394c7a2

URL: https://github.com/llvm/llvm-project/commit/9b346f974ea606e17064969568568da30394c7a2
DIFF: https://github.com/llvm/llvm-project/commit/9b346f974ea606e17064969568568da30394c7a2.diff

LOG: [gn build] Do not sync filenames containing variable references

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 a54483da8e55..ae65b50b1b55 100755
--- a/llvm/utils/gn/build/sync_source_lists_from_cmake.py
+++ b/llvm/utils/gn/build/sync_source_lists_from_cmake.py
@@ -61,10 +61,10 @@ def git_out(args):
     gn_files = git_out(['ls-files', '*BUILD.gn']).splitlines()
 
     # Matches e.g. |   "foo.cpp",|, captures |foo| in group 1.
-    gn_cpp_re = re.compile(r'^\s*"([^"]+\.(?:cpp|c|h|S))",$', re.MULTILINE)
+    gn_cpp_re = re.compile(r'^\s*"([^$"]+\.(?:cpp|c|h|S))",$', re.MULTILINE)
     # Matches e.g. |   bar_sources = [ "foo.cpp" ]|, captures |foo| in group 1.
     gn_cpp_re2 = re.compile(
-        r'^\s*(?:.*_)?sources \+?= \[ "([^"]+\.(?:cpp|c|h|S))" ]$',
+        r'^\s*(?:.*_)?sources \+?= \[ "([^$"]+\.(?:cpp|c|h|S))" ]$',
         re.MULTILINE)
     # Matches e.g. |   foo.cpp|, captures |foo| in group 1.
     cmake_cpp_re = re.compile(r'^\s*([A-Za-z_0-9./-]+\.(?:cpp|c|h|S))$',


        


More information about the llvm-commits mailing list