individually escape results of $(locations)
proptools.ShellEscape escapes mostly by surrounding the string in
quotes. This makes all the files from a $(locations) be passed as
one shell argument if escaping was needed. Escape them individually
so that they're still passed as separate arguments.
Bug: 307824623
Test: running art tests with aosp/2860435
Change-Id: I9940941f4a7bb4d29d9388e4d57f8cbd732b6d32
diff --git a/genrule/genrule.go b/genrule/genrule.go
index 6b11019..4db4e86 100644
--- a/genrule/genrule.go
+++ b/genrule/genrule.go
@@ -539,7 +539,7 @@
if len(paths) == 0 {
return reportError("label %q has no files", label)
}
- return proptools.ShellEscape(strings.Join(paths, " ")), nil
+ return strings.Join(proptools.ShellEscapeList(paths), " "), nil
} else {
return reportError("unknown locations label %q is not in srcs, out, tools or tool_files.", label)
}