conditionally escape rule builder command am: d96a60685a

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2751019

Change-Id: I31eeb068f367331a29a693eaffc1d6bdd2d4d809
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Sam Delmerico 2023-09-20 19:25:22 +00:00 committed by Automerger Merge Worker
commit 8e80e4a155

View file

@ -756,9 +756,13 @@ func (r *RuleBuilder) build(name string, desc string, ninjaEscapeCommandString b
pool = localPool pool = localPool
} }
if ninjaEscapeCommandString {
commandString = proptools.NinjaEscape(commandString)
}
r.ctx.Build(r.pctx, BuildParams{ r.ctx.Build(r.pctx, BuildParams{
Rule: r.ctx.Rule(r.pctx, name, blueprint.RuleParams{ Rule: r.ctx.Rule(r.pctx, name, blueprint.RuleParams{
Command: proptools.NinjaEscape(commandString), Command: commandString,
CommandDeps: proptools.NinjaEscapeList(tools.Strings()), CommandDeps: proptools.NinjaEscapeList(tools.Strings()),
Restat: r.restat, Restat: r.restat,
Rspfile: proptools.NinjaEscape(rspFile), Rspfile: proptools.NinjaEscape(rspFile),