ndk_library: separate abidw and abitidy into separate rules am: c2346f1c21

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

Change-Id: Iee14342d6f062b7ed84305e038505c025fbbc849
This commit is contained in:
Matthias Maennich 2021-09-03 13:03:42 +00:00 committed by Automerger Merge Worker
commit 276f996713

View file

@ -45,11 +45,17 @@ var (
abidw = pctx.AndroidStaticRule("abidw",
blueprint.RuleParams{
Command: "$abidw --type-id-style hash --no-corpus-path " +
"--no-show-locs --no-comp-dir-path -w $symbolList $in | " +
"$abitidy --all -o $out",
CommandDeps: []string{"$abitidy", "$abidw"},
"--no-show-locs --no-comp-dir-path -w $symbolList " +
"$in --out-file $out",
CommandDeps: []string{"$abidw"},
}, "symbolList")
abitidy = pctx.AndroidStaticRule("abitidy",
blueprint.RuleParams{
Command: "$abitidy --all -i $in -o $out",
CommandDeps: []string{"$abitidy"},
})
abidiff = pctx.AndroidStaticRule("abidiff",
blueprint.RuleParams{
// Need to create *some* output for ninja. We don't want to use tee
@ -313,19 +319,28 @@ func canDiffAbi() bool {
func (this *stubDecorator) dumpAbi(ctx ModuleContext, symbolList android.Path) {
implementationLibrary := this.findImplementationLibrary(ctx)
this.abiDumpPath = getNdkAbiDumpInstallBase(ctx).Join(ctx,
abiRawPath := getNdkAbiDumpInstallBase(ctx).Join(ctx,
this.apiLevel.String(), ctx.Arch().ArchType.String(),
this.libraryName(ctx), "abi.xml")
this.libraryName(ctx), "abi.raw.xml")
ctx.Build(pctx, android.BuildParams{
Rule: abidw,
Description: fmt.Sprintf("abidw %s", implementationLibrary),
Output: this.abiDumpPath,
Input: implementationLibrary,
Output: abiRawPath,
Implicit: symbolList,
Args: map[string]string{
"symbolList": symbolList.String(),
},
})
this.abiDumpPath = getNdkAbiDumpInstallBase(ctx).Join(ctx,
this.apiLevel.String(), ctx.Arch().ArchType.String(),
this.libraryName(ctx), "abi.xml")
ctx.Build(pctx, android.BuildParams{
Rule: abitidy,
Description: fmt.Sprintf("abitidy %s", implementationLibrary),
Input: abiRawPath,
Output: this.abiDumpPath,
})
}
func findNextApiLevel(ctx ModuleContext, apiLevel android.ApiLevel) *android.ApiLevel {