conditionally escape rule builder command
For rules which use RuleBuilder with Ninja variables (using the BuildWithUnescapedNinjaVars function) but are not sandboxed, the command output by RuleBuilder must not be escaped, or else Ninja variables will not be evaluated until they are run on the command line. Test: m libnum_traits liboid_registry crosvm droid Change-Id: I81611368ab1975220f7f517df2f57646deac2af8
This commit is contained in:
parent
0e2d63e4d2
commit
d96a60685a
1 changed files with 5 additions and 1 deletions
|
@ -756,9 +756,13 @@ func (r *RuleBuilder) build(name string, desc string, ninjaEscapeCommandString b
|
|||
pool = localPool
|
||||
}
|
||||
|
||||
if ninjaEscapeCommandString {
|
||||
commandString = proptools.NinjaEscape(commandString)
|
||||
}
|
||||
|
||||
r.ctx.Build(r.pctx, BuildParams{
|
||||
Rule: r.ctx.Rule(r.pctx, name, blueprint.RuleParams{
|
||||
Command: proptools.NinjaEscape(commandString),
|
||||
Command: commandString,
|
||||
CommandDeps: proptools.NinjaEscapeList(tools.Strings()),
|
||||
Restat: r.restat,
|
||||
Rspfile: proptools.NinjaEscape(rspFile),
|
||||
|
|
Loading…
Reference in a new issue