Add explicit rspfile argument to RuleBuilderCommand.FlagWithRspFileInputList
Using $out.rsp as the rsp file adds extra complexity around keeping the $ unescaped. Make callers to FlagWithRspFileInputList provide an explicit path for the rsp file instead. Bug: 182612695 Test: rule_builder_test.go Change-Id: I3f531d80c1efa8a9d09aac0a63790c5b11a9f0c6
This commit is contained in:
@@ -64,7 +64,9 @@ func kotlinCommonSrcsList(ctx android.ModuleContext, commonSrcFiles android.Path
|
||||
// Insert a second rule to write out the list of resources to a file.
|
||||
commonSrcsList := android.PathForModuleOut(ctx, "kotlinc_common_srcs.list")
|
||||
rule := android.NewRuleBuilder(pctx, ctx)
|
||||
rule.Command().Text("cp").FlagWithRspFileInputList("", commonSrcFiles).Output(commonSrcsList)
|
||||
rule.Command().Text("cp").
|
||||
FlagWithRspFileInputList("", commonSrcsList.ReplaceExtension(ctx, "rsp"), commonSrcFiles).
|
||||
Output(commonSrcsList)
|
||||
rule.Build("kotlin_common_srcs_list", "kotlin common_srcs list")
|
||||
return android.OptionalPathForPath(commonSrcsList)
|
||||
}
|
||||
|
Reference in New Issue
Block a user