diff --git a/cc/cc.go b/cc/cc.go index 1100bac6e..6215067b8 100644 --- a/cc/cc.go +++ b/cc/cc.go @@ -778,6 +778,10 @@ func (ctx *moduleContextImpl) shouldCreateVndkSourceAbiDump(config android.Confi // APEX variants do not need ABI dumps. return false } + if ctx.isStubs() { + // Stubs do not need ABI dumps. + return false + } if ctx.isNdk() { return true } diff --git a/cc/library.go b/cc/library.go index f98cd3623..5fbb36ed6 100644 --- a/cc/library.go +++ b/cc/library.go @@ -810,7 +810,7 @@ func getRefAbiDumpFile(ctx ModuleContext, vndkVersion, fileName string) android. } func (library *libraryDecorator) linkSAbiDumpFiles(ctx ModuleContext, objs Objects, fileName string, soFile android.Path) { - if len(objs.sAbiDumpFiles) > 0 && library.shouldCreateVndkSourceAbiDump(ctx) { + if library.shouldCreateVndkSourceAbiDump(ctx) { vndkVersion := ctx.DeviceConfig().PlatformVndkVersion() if ver := ctx.DeviceConfig().VndkVersion(); ver != "" && ver != "current" { vndkVersion = ver