-l option soong_zip can accept a file having space separated list

-l option of soong_zip is used to specify the list of input files that
should be zipped. However, it only accepted newline-separated list in the
file. This prevented us from using a rspfile as paths in rspfile are
space-separated in a single line. Fixing the problem by splitting the
file content by any unicode whitespace character including newline and
space.

Test: zip_test
Change-Id: Iba572109e30c01540eacf20bd2794ba60c870fa3
This commit is contained in:
Jiyong Park
2019-11-04 13:18:41 +09:00
parent f68f98eeb6
commit 04bbf98e06
2 changed files with 16 additions and 3 deletions

View File

@@ -145,7 +145,7 @@ func (b *FileArgsBuilder) List(name string) *FileArgsBuilder {
}
arg := b.state
arg.SourceFiles = strings.Split(string(list), "\n")
arg.SourceFiles = strings.Fields(string(list))
b.fileArgs = append(b.fileArgs, arg)
return b
}