Add explicit rspfile argument to RuleBuilderCommand.FlagWithRspFileInputList am: 70c4741215
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1634804 Change-Id: Id1d3d6b1047f0492eaa88ada521dd8c4cdb22670
This commit is contained in:
@@ -812,7 +812,7 @@ func javadocCmd(ctx android.ModuleContext, rule *android.RuleBuilder, srcs andro
|
||||
BuiltTool("soong_javac_wrapper").Tool(config.JavadocCmd(ctx)).
|
||||
Flag(config.JavacVmFlags).
|
||||
FlagWithArg("-encoding ", "UTF-8").
|
||||
FlagWithRspFileInputList("@", srcs).
|
||||
FlagWithRspFileInputList("@", android.PathForModuleOut(ctx, "javadoc.rsp"), srcs).
|
||||
FlagWithInput("@", srcJarList)
|
||||
|
||||
// TODO(ccross): Remove this if- statement once we finish migration for all Doclava
|
||||
@@ -1243,7 +1243,7 @@ func metalavaCmd(ctx android.ModuleContext, rule *android.RuleBuilder, javaVersi
|
||||
Flag("-J--add-opens=java.base/java.util=ALL-UNNAMED").
|
||||
FlagWithArg("-encoding ", "UTF-8").
|
||||
FlagWithArg("-source ", javaVersion.String()).
|
||||
FlagWithRspFileInputList("@", srcs).
|
||||
FlagWithRspFileInputList("@", android.PathForModuleOut(ctx, "metalava.rsp"), srcs).
|
||||
FlagWithInput("@", srcJarList)
|
||||
|
||||
if javaHome := ctx.Config().Getenv("ANDROID_JAVA_HOME"); javaHome != "" {
|
||||
@@ -1446,7 +1446,9 @@ func (d *Droidstubs) GenerateAndroidBuildActions(ctx android.ModuleContext) {
|
||||
// add a large number of inputs to a file without exceeding bash command length limits (which
|
||||
// would happen if we use the WriteFile rule). The cp is needed because RuleBuilder sets the
|
||||
// rsp file to be ${output}.rsp.
|
||||
impCmd.Text("cp").FlagWithRspFileInputList("", cmd.GetImplicits()).Output(implicitsRsp)
|
||||
impCmd.Text("cp").
|
||||
FlagWithRspFileInputList("", android.PathForModuleOut(ctx, "metalava-implicits.rsp"), cmd.GetImplicits()).
|
||||
Output(implicitsRsp)
|
||||
impRule.Build("implicitsGen", "implicits generation")
|
||||
cmd.Implicit(implicitsRsp)
|
||||
|
||||
@@ -1750,7 +1752,7 @@ func (p *PrebuiltStubsSources) GenerateAndroidBuildActions(ctx android.ModuleCon
|
||||
Flag("-jar").
|
||||
FlagWithOutput("-o ", p.stubsSrcJar).
|
||||
FlagWithArg("-C ", srcDir.String()).
|
||||
FlagWithRspFileInputList("-r ", srcPaths)
|
||||
FlagWithRspFileInputList("-r ", p.stubsSrcJar.ReplaceExtension(ctx, "rsp"), srcPaths)
|
||||
|
||||
rule.Restat()
|
||||
|
||||
|
@@ -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)
|
||||
}
|
||||
|
11
java/lint.go
11
java/lint.go
@@ -220,7 +220,9 @@ func (l *linter) writeLintProjectXML(ctx android.ModuleContext, rule *android.Ru
|
||||
// Insert a second rule to write out the list of resources to a file.
|
||||
resourcesList = android.PathForModuleOut(ctx, "lint", "resources.list")
|
||||
resListRule := android.NewRuleBuilder(pctx, ctx)
|
||||
resListRule.Command().Text("cp").FlagWithRspFileInputList("", l.resources).Output(resourcesList)
|
||||
resListRule.Command().Text("cp").
|
||||
FlagWithRspFileInputList("", resourcesList.ReplaceExtension(ctx, "rsp"), l.resources).
|
||||
Output(resourcesList)
|
||||
resListRule.Build("lint_resources_list", "lint resources list")
|
||||
trackRSPDependency(l.resources, resourcesList)
|
||||
}
|
||||
@@ -241,7 +243,10 @@ func (l *linter) writeLintProjectXML(ctx android.ModuleContext, rule *android.Ru
|
||||
// TODO(ccross): some of the files in l.srcs are generated sources and should be passed to
|
||||
// lint separately.
|
||||
srcsList := android.PathForModuleOut(ctx, "lint", "srcs.list")
|
||||
rule.Command().Text("cp").FlagWithRspFileInputList("", l.srcs).Output(srcsList)
|
||||
srcsListRsp := android.PathForModuleOut(ctx, "lint-srcs.list.rsp")
|
||||
rule.Command().Text("cp").
|
||||
FlagWithRspFileInputList("", srcsListRsp, l.srcs).
|
||||
Output(srcsList)
|
||||
trackRSPDependency(l.srcs, srcsList)
|
||||
|
||||
cmd := rule.Command().
|
||||
@@ -635,7 +640,7 @@ func lintZip(ctx android.BuilderContext, paths android.Paths, outputPath android
|
||||
rule.Command().BuiltTool("soong_zip").
|
||||
FlagWithOutput("-o ", outputPath).
|
||||
FlagWithArg("-C ", android.PathForIntermediates(ctx).String()).
|
||||
FlagWithRspFileInputList("-r ", paths)
|
||||
FlagWithRspFileInputList("-r ", outputPath.ReplaceExtension(ctx, "rsp"), paths)
|
||||
|
||||
rule.Build(outputPath.Base(), outputPath.Base())
|
||||
}
|
||||
|
Reference in New Issue
Block a user