Ninja escape RuleBuilder rule params

The CommandDeps and Rspfile properties can contain arbitrary paths
that may need ninja escaping.

Bug: 182612695
Test: genrule_test.go
Change-Id: I1426e9dfeab3bde9f65b61d0c47840f97c1c7526
This commit is contained in:
Colin Cross 2021-03-16 16:49:52 -07:00
parent 7d1f1cf27c
commit 4502978bee

View file

@ -586,9 +586,9 @@ func (r *RuleBuilder) Build(name string, desc string) {
r.ctx.Build(r.pctx, BuildParams{
Rule: r.ctx.Rule(pctx, name, blueprint.RuleParams{
Command: commandString,
CommandDeps: tools.Strings(),
CommandDeps: proptools.NinjaEscapeList(tools.Strings()),
Restat: r.restat,
Rspfile: rspFile,
Rspfile: proptools.NinjaEscape(rspFile),
RspfileContent: rspFileContent,
Pool: pool,
}),