Remove the use of version scripts with header-abi-linker.
Version scripts were earlier used as a symbol map, primarily for llndk
libraries. Since they do have stub libraries which contain symbols, we
shall use them instead, to internally form symbol maps in
header-abi-linker.
Test: mm -j64 in bionic/libdl, header-abi-linker gets invoked with
-so <so-file> rather than -v <version-script>
Change-Id: Ifb67dc34457a997f37cc9f71ca16ad068e9b44c1
diff --git a/cc/builder.go b/cc/builder.go
index db4cb4f..fcc4318 100644
--- a/cc/builder.go
+++ b/cc/builder.go
@@ -187,12 +187,12 @@
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 @@
// 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,
},
})
diff --git a/cc/library.go b/cc/library.go
index 4a900ef..adbd6b5 100644
--- a/cc/library.go
+++ b/cc/library.go
@@ -620,11 +620,6 @@
//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 @@
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)