forked from OSchip/llvm-project
[gn build] unconfuse sync script about "sources = []" in clang/lib/Headers/BUILD.gn
This commit is contained in:
parent
2240ca0bd1
commit
15c378f6e6
llvm/utils/gn/build
|
@ -29,6 +29,9 @@ def patch_gn_file(gn_file, add, remove):
|
|||
|
||||
srcs_tok = 'sources = ['
|
||||
tokloc = gn_contents.find(srcs_tok)
|
||||
while tokloc != -1 and tokloc + len(srcs_tok) < len(gn_contents) and \
|
||||
gn_contents[tokloc + len(srcs_tok)] == ']':
|
||||
tokloc = gn_contents.find(srcs_tok, tokloc + 1)
|
||||
|
||||
if tokloc == -1: raise ValueError(gn_file + ': Failed to find source list')
|
||||
if gn_contents.find(srcs_tok, tokloc + 1) != -1:
|
||||
|
|
Loading…
Reference in New Issue