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

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.

Change-Id: Iae25374fe937a0cbe8a8ddf9e23c3bc1f62bbb2a
This commit is contained in:
Jayant Chowdhary 2018-02-01 17:23:09 -08:00
parent d3c59a2b3a
commit d8b70a39d1

View file

@ -203,9 +203,11 @@ var (
commandStr := "($sAbiDiffer $allowFlags -lib $libName -arch $arch -check-all-apis -o ${out} -new $in -old $referenceDump)"
distAbiDiffDir := android.PathForDist(ctx, "abidiffs")
commandStr += "|| (echo ' ---- Please update abi references by running platform/development/vndk/tools/header-checker/utils/create_reference_dumps.py -l ${libName} ----'"
if distAbiDiffDir.Valid() {
commandStr += " || (mkdir -p " + distAbiDiffDir.String() + " && cp ${out} " + distAbiDiffDir.String() + " && exit 1)"
commandStr += ") && (mkdir -p " + distAbiDiffDir.String() + " && cp ${out} " + distAbiDiffDir.String()
}
commandStr += " && exit 1)"
return blueprint.RuleParams{
Command: commandStr,
CommandDeps: []string{"$sAbiDiffer"},
@ -740,7 +742,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, " "),
},