diff options
author | Jayant Chowdhary <jchowdhary@google.com> | 2018-01-17 13:13:33 -0800 |
---|---|---|
committer | Jayant Chowdhary <jchowdhary@google.com> | 2018-01-18 15:52:43 -0800 |
commit | e44995078fd7033eaaf985429d155e1857f1b7ab (patch) | |
tree | 4460ae777405088bd2ef32666726b726c3ee4ef3 /cc/builder.go | |
parent | 64946fec54ab602abd2ea73e3eb590b97bfd03e5 (diff) | |
download | build_soong-e44995078fd7033eaaf985429d155e1857f1b7ab.tar.gz build_soong-e44995078fd7033eaaf985429d155e1857f1b7ab.tar.bz2 build_soong-e44995078fd7033eaaf985429d155e1857f1b7ab.zip |
Use -advice-only for libraries which do not export headers.
While diffing abi, for libraries which do not export headers, use
-advice-only.
Test: Create reference dump for libdl; mm -j64; header-abi-diff gets
invoked with '-advice-only'.
Test: Create reference dump for libjpeg; mm -j64; header-abi-diff gets
invoked without '-advice-only'.
Bug: 71768219
Change-Id: I678346081f15088388f223f1276d0b0c42d2a8c2
Diffstat (limited to 'cc/builder.go')
-rw-r--r-- | cc/builder.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/cc/builder.go b/cc/builder.go index fcc43181..1e1c4f23 100644 --- a/cc/builder.go +++ b/cc/builder.go @@ -711,8 +711,12 @@ func UnzipRefDump(ctx android.ModuleContext, zippedRefDump android.Path, baseNam } func SourceAbiDiff(ctx android.ModuleContext, inputDump android.Path, referenceDump android.Path, - baseName string) android.OptionalPath { + baseName, exportedHeaderFlags string) android.OptionalPath { outputFile := android.PathForModuleOut(ctx, baseName+".abidiff") + localAbiCheckAllowFlags := append([]string(nil), abiCheckAllowFlags...) + if exportedHeaderFlags == "" { + localAbiCheckAllowFlags = append(localAbiCheckAllowFlags, "-advice-only") + } ctx.Build(pctx, android.BuildParams{ Rule: sAbiDiff, Description: "header-abi-diff " + outputFile.Base(), @@ -723,7 +727,7 @@ func SourceAbiDiff(ctx android.ModuleContext, inputDump android.Path, referenceD "referenceDump": referenceDump.String(), "libName": baseName, "arch": ctx.Arch().ArchType.Name, - "allowFlags": strings.Join(abiCheckAllowFlags, " "), + "allowFlags": strings.Join(localAbiCheckAllowFlags, " "), }, }) return android.OptionalPathForPath(outputFile) |