Add informational message to help with updation of VNDK abi references.

Bug: 64267858

Test: create reference dump for libjpeg; add exported function to libjpeg;
      m -j libjpeg.vendor, build fails with helpful message.

Test: create reference dump for libjpeg; add exported function to libjpeg;
      m -j libjpeg.vendor dist DIST_DIR=dist, build fails with helpful message.

Merged-In: Iae25374fe937a0cbe8a8ddf9e23c3bc1f62bbb2a
Change-Id: Iae25374fe937a0cbe8a8ddf9e23c3bc1f62bbb2a
(cherry picked from commit d8b70a39d1)
(cherry picked from commit 301aa8a8dcb0a92e96ffbf1aa2da3ca49ce2bda9)
This commit is contained in:
Jayant Chowdhary 2018-02-01 17:23:09 -08:00
parent d2cc96c24a
commit e3ee2f5e67
1 changed files with 4 additions and 2 deletions

View File

@ -200,10 +200,12 @@ var (
commandStr := "($sAbiDiffer $allowFlags -lib $libName -arch $arch -check-all-apis -o ${out} -new $in -old $referenceDump)"
distDir := config.ProductVariables.DistDir
commandStr += " || (echo ' ---- Please update abi references by running platform/development/vndk/tools/header-checker/utils/create_reference_dumps.py -l ${libName} ----'"
if distDir != nil && *distDir != "" {
distAbiDiffDir := *distDir + "/abidiffs/"
commandStr += " || (mkdir -p " + distAbiDiffDir + " && cp ${out} " + distAbiDiffDir + " && exit 1)"
commandStr += " && (mkdir -p " + distAbiDiffDir + " && cp ${out} " + distAbiDiffDir + ")"
}
commandStr += " && exit 1)"
return blueprint.RuleParams{
Command: commandStr,
CommandDeps: []string{"$sAbiDiffer"},
@ -738,7 +740,7 @@ func SourceAbiDiff(ctx android.ModuleContext, inputDump android.Path, referenceD
Implicit: referenceDump,
Args: map[string]string{
"referenceDump": referenceDump.String(),
"libName": baseName,
"libName": baseName[0:(len(baseName) - len(filepath.Ext(baseName)))],
"arch": ctx.Arch().ArchType.Name,
"allowFlags": strings.Join(localAbiCheckAllowFlags, " "),
},