Merge "Copy abidiffs into /abidiffs on abi breakages." am: 3e6584556d
am: eb11ca9596
Change-Id: If63adfeb06b0c60a79ae6ce04d89cac7a6349aff
This commit is contained in:
commit
c86d1850c7
2 changed files with 14 additions and 5 deletions
|
@ -189,6 +189,7 @@ type productVariables struct {
|
|||
Override_rs_driver *string `json:",omitempty"`
|
||||
|
||||
DeviceKernelHeaders []string `json:",omitempty"`
|
||||
DistDir *string `json:",omitempty"`
|
||||
}
|
||||
|
||||
func boolPtr(v bool) *bool {
|
||||
|
|
|
@ -196,11 +196,19 @@ var (
|
|||
|
||||
_ = pctx.SourcePathVariable("sAbiDiffer", "prebuilts/build-tools/${config.HostPrebuiltTag}/bin/header-abi-diff")
|
||||
|
||||
// Abidiff check turned on in advice-only mode. Builds will not fail on abi incompatibilties / extensions.
|
||||
sAbiDiff = pctx.AndroidStaticRule("sAbiDiff",
|
||||
blueprint.RuleParams{
|
||||
Command: "$sAbiDiffer $allowFlags -lib $libName -arch $arch -check-all-apis -o ${out} -new $in -old $referenceDump",
|
||||
CommandDeps: []string{"$sAbiDiffer"},
|
||||
sAbiDiff = pctx.AndroidRuleFunc("sAbiDiff",
|
||||
func(config android.Config) (blueprint.RuleParams, error) {
|
||||
|
||||
commandStr := "($sAbiDiffer $allowFlags -lib $libName -arch $arch -check-all-apis -o ${out} -new $in -old $referenceDump)"
|
||||
distDir := config.ProductVariables.DistDir
|
||||
if distDir != nil && *distDir != "" {
|
||||
distAbiDiffDir := *distDir + "/abidiffs/"
|
||||
commandStr += " || (mkdir -p " + distAbiDiffDir + " && cp ${out} " + distAbiDiffDir + " && exit 1)"
|
||||
}
|
||||
return blueprint.RuleParams{
|
||||
Command: commandStr,
|
||||
CommandDeps: []string{"$sAbiDiffer"},
|
||||
}, nil
|
||||
},
|
||||
"allowFlags", "referenceDump", "libName", "arch")
|
||||
|
||||
|
|
Loading…
Reference in a new issue