Merge "Remove the use of version scripts with header-abi-linker." am: 85935a2f9c

am: 807df5b8d1

Change-Id: I36fda713783470a6560d3832fd19f0e9db671232
This commit is contained in:
Jayant Chowdhary 2018-01-18 18:18:01 +00:00 committed by android-build-merger
commit 84ca81d8b5
2 changed files with 8 additions and 22 deletions

View file

@ -187,12 +187,12 @@ var (
sAbiLink = pctx.AndroidStaticRule("sAbiLink",
blueprint.RuleParams{
Command: "$sAbiLinker -o ${out} $symbolFilter -arch $arch -api $api $exportedHeaderFlags @${out}.rsp ",
Command: "$sAbiLinker -o ${out} $symbolFilter -arch $arch $exportedHeaderFlags @${out}.rsp ",
CommandDeps: []string{"$sAbiLinker"},
Rspfile: "${out}.rsp",
RspfileContent: "${in}",
},
"symbolFilter", "arch", "api", "exportedHeaderFlags")
"symbolFilter", "arch", "exportedHeaderFlags")
_ = pctx.SourcePathVariable("sAbiDiffer", "prebuilts/build-tools/${config.HostPrebuiltTag}/bin/header-abi-diff")
@ -681,27 +681,18 @@ func TransformObjToDynamicBinary(ctx android.ModuleContext,
// Generate a rule to combine .dump sAbi dump files from multiple source files
// into a single .ldump sAbi dump file
func TransformDumpToLinkedDump(ctx android.ModuleContext, sAbiDumps android.Paths, soFile android.Path,
symbolFile android.OptionalPath, apiLevel, baseName, exportedHeaderFlags string) android.OptionalPath {
baseName, exportedHeaderFlags string) android.OptionalPath {
outputFile := android.PathForModuleOut(ctx, baseName+".lsdump")
var symbolFilterStr string
var linkedDumpDep android.Path
if symbolFile.Valid() {
symbolFilterStr = "-v " + symbolFile.Path().String()
linkedDumpDep = symbolFile.Path()
} else {
linkedDumpDep = soFile
symbolFilterStr = "-so " + soFile.String()
}
symbolFilterStr := "-so " + soFile.String()
ctx.Build(pctx, android.BuildParams{
Rule: sAbiLink,
Description: "header-abi-linker " + outputFile.Base(),
Output: outputFile,
Inputs: sAbiDumps,
Implicit: linkedDumpDep,
Implicit: soFile,
Args: map[string]string{
"symbolFilter": symbolFilterStr,
"arch": ctx.Arch().ArchType.Name,
"api": apiLevel,
"symbolFilter": symbolFilterStr,
"arch": ctx.Arch().ArchType.Name,
"exportedHeaderFlags": exportedHeaderFlags,
},
})

View file

@ -620,11 +620,6 @@ func (library *libraryDecorator) linkSAbiDumpFiles(ctx ModuleContext, objs Objec
//Also take into account object re-use.
if len(objs.sAbiDumpFiles) > 0 && ctx.createVndkSourceAbiDump() {
refSourceDumpFile := android.PathForVndkRefAbiDump(ctx, "current", fileName, vndkVsNdk(ctx), true)
versionScript := android.OptionalPathForModuleSrc(ctx, library.Properties.Version_script)
var symbolFile android.OptionalPath
if versionScript.Valid() {
symbolFile = versionScript
}
exportIncludeDirs := library.flagExporter.exportedIncludes(ctx)
var SourceAbiFlags []string
for _, dir := range exportIncludeDirs.Strings() {
@ -634,7 +629,7 @@ func (library *libraryDecorator) linkSAbiDumpFiles(ctx ModuleContext, objs Objec
SourceAbiFlags = append(SourceAbiFlags, reexportedInclude)
}
exportedHeaderFlags := strings.Join(SourceAbiFlags, " ")
library.sAbiOutputFile = TransformDumpToLinkedDump(ctx, objs.sAbiDumpFiles, soFile, symbolFile, "current", fileName, exportedHeaderFlags)
library.sAbiOutputFile = TransformDumpToLinkedDump(ctx, objs.sAbiDumpFiles, soFile, fileName, exportedHeaderFlags)
if refSourceDumpFile.Valid() {
unzippedRefDump := UnzipRefDump(ctx, refSourceDumpFile.Path(), fileName)
library.sAbiDiff = SourceAbiDiff(ctx, library.sAbiOutputFile.Path(), unzippedRefDump, fileName)