Switch PackageContext functions to take a ctx
So that the Path and similar functions can be used directly, without manually adding something like configErrorWrapper (it just uses it all the time now). Test: out/soong/build.ninja is identical Change-Id: I8cb524b09a84d0b8357d7c3501c71270af411e17
This commit is contained in:
@@ -197,10 +197,10 @@ var (
|
||||
_ = pctx.SourcePathVariable("sAbiDiffer", "prebuilts/clang-tools/${config.HostPrebuiltTag}/bin/header-abi-diff")
|
||||
|
||||
sAbiDiff = pctx.AndroidRuleFunc("sAbiDiff",
|
||||
func(config android.Config) (blueprint.RuleParams, error) {
|
||||
func(ctx android.PackageRuleContext) blueprint.RuleParams {
|
||||
|
||||
commandStr := "($sAbiDiffer $allowFlags -lib $libName -arch $arch -check-all-apis -o ${out} -new $in -old $referenceDump)"
|
||||
distDir := config.ProductVariables.DistDir
|
||||
distDir := ctx.Config().ProductVariables.DistDir
|
||||
if distDir != nil && *distDir != "" {
|
||||
distAbiDiffDir := *distDir + "/abidiffs/"
|
||||
commandStr += " || (mkdir -p " + distAbiDiffDir + " && cp ${out} " + distAbiDiffDir + " && exit 1)"
|
||||
@@ -208,7 +208,7 @@ var (
|
||||
return blueprint.RuleParams{
|
||||
Command: commandStr,
|
||||
CommandDeps: []string{"$sAbiDiffer"},
|
||||
}, nil
|
||||
}
|
||||
},
|
||||
"allowFlags", "referenceDump", "libName", "arch")
|
||||
|
||||
|
Reference in New Issue
Block a user