Loading cc/ndk_abi.go +1 −1 Original line number Diff line number Diff line Loading @@ -46,7 +46,7 @@ func (n *ndkAbiDumpSingleton) GenerateBuildActions(ctx android.SingletonContext) if m, ok := module.(*Module); ok { if installer, ok := m.installer.(*stubDecorator); ok { if canDumpAbi(ctx.Config(), ctx.ModuleDir(module)) { if installer.hasAbiDump { depPaths = append(depPaths, installer.abiDumpPath) } } Loading cc/ndk_library.go +12 −4 Original line number Diff line number Diff line Loading @@ -125,6 +125,7 @@ type stubDecorator struct { parsedCoverageXmlPath android.ModuleOutPath installPath android.Path abiDumpPath android.OutputPath hasAbiDump bool abiDiffPaths android.Paths apiLevel android.ApiLevel Loading Loading @@ -330,11 +331,11 @@ func (this *stubDecorator) findPrebuiltAbiDump(ctx ModuleContext, } // Feature flag. func canDumpAbi(config android.Config, moduleDir string) bool { func (this *stubDecorator) canDumpAbi(ctx ModuleContext) bool { if runtime.GOOS == "darwin" { return false } if strings.HasPrefix(moduleDir, "bionic/") { if strings.HasPrefix(ctx.ModuleDir(), "bionic/") { // Bionic has enough uncommon implementation details like ifuncs and asm // code that the ABI tracking here has a ton of false positives. That's // causing pretty extreme friction for development there, so disabling Loading @@ -343,8 +344,14 @@ func canDumpAbi(config android.Config, moduleDir string) bool { // http://b/358653811 return false } if this.apiLevel.IsCurrent() { // "current" (AKA 10000) is not tracked. return false } // http://b/156513478 return config.ReleaseNdkAbiMonitored() return ctx.Config().ReleaseNdkAbiMonitored() } // Feature flag to disable diffing against prebuilts. Loading @@ -357,6 +364,7 @@ func (this *stubDecorator) dumpAbi(ctx ModuleContext, symbolList android.Path) { this.abiDumpPath = getNdkAbiDumpInstallBase(ctx).Join(ctx, this.apiLevel.String(), ctx.Arch().ArchType.String(), this.libraryName(ctx), "abi.stg") this.hasAbiDump = true headersList := getNdkABIHeadersFile(ctx) ctx.Build(pctx, android.BuildParams{ Rule: stg, Loading Loading @@ -478,7 +486,7 @@ func (c *stubDecorator) compile(ctx ModuleContext, flags Flags, deps PathDeps) O nativeAbiResult := parseNativeAbiDefinition(ctx, symbolFile, c.apiLevel, "") objs := compileStubLibrary(ctx, flags, nativeAbiResult.stubSrc) c.versionScriptPath = nativeAbiResult.versionScript if canDumpAbi(ctx.Config(), ctx.ModuleDir()) { if c.canDumpAbi(ctx) { c.dumpAbi(ctx, nativeAbiResult.symbolList) if canDiffAbi(ctx.Config()) { c.diffAbi(ctx) Loading Loading
cc/ndk_abi.go +1 −1 Original line number Diff line number Diff line Loading @@ -46,7 +46,7 @@ func (n *ndkAbiDumpSingleton) GenerateBuildActions(ctx android.SingletonContext) if m, ok := module.(*Module); ok { if installer, ok := m.installer.(*stubDecorator); ok { if canDumpAbi(ctx.Config(), ctx.ModuleDir(module)) { if installer.hasAbiDump { depPaths = append(depPaths, installer.abiDumpPath) } } Loading
cc/ndk_library.go +12 −4 Original line number Diff line number Diff line Loading @@ -125,6 +125,7 @@ type stubDecorator struct { parsedCoverageXmlPath android.ModuleOutPath installPath android.Path abiDumpPath android.OutputPath hasAbiDump bool abiDiffPaths android.Paths apiLevel android.ApiLevel Loading Loading @@ -330,11 +331,11 @@ func (this *stubDecorator) findPrebuiltAbiDump(ctx ModuleContext, } // Feature flag. func canDumpAbi(config android.Config, moduleDir string) bool { func (this *stubDecorator) canDumpAbi(ctx ModuleContext) bool { if runtime.GOOS == "darwin" { return false } if strings.HasPrefix(moduleDir, "bionic/") { if strings.HasPrefix(ctx.ModuleDir(), "bionic/") { // Bionic has enough uncommon implementation details like ifuncs and asm // code that the ABI tracking here has a ton of false positives. That's // causing pretty extreme friction for development there, so disabling Loading @@ -343,8 +344,14 @@ func canDumpAbi(config android.Config, moduleDir string) bool { // http://b/358653811 return false } if this.apiLevel.IsCurrent() { // "current" (AKA 10000) is not tracked. return false } // http://b/156513478 return config.ReleaseNdkAbiMonitored() return ctx.Config().ReleaseNdkAbiMonitored() } // Feature flag to disable diffing against prebuilts. Loading @@ -357,6 +364,7 @@ func (this *stubDecorator) dumpAbi(ctx ModuleContext, symbolList android.Path) { this.abiDumpPath = getNdkAbiDumpInstallBase(ctx).Join(ctx, this.apiLevel.String(), ctx.Arch().ArchType.String(), this.libraryName(ctx), "abi.stg") this.hasAbiDump = true headersList := getNdkABIHeadersFile(ctx) ctx.Build(pctx, android.BuildParams{ Rule: stg, Loading Loading @@ -478,7 +486,7 @@ func (c *stubDecorator) compile(ctx ModuleContext, flags Flags, deps PathDeps) O nativeAbiResult := parseNativeAbiDefinition(ctx, symbolFile, c.apiLevel, "") objs := compileStubLibrary(ctx, flags, nativeAbiResult.stubSrc) c.versionScriptPath = nativeAbiResult.versionScript if canDumpAbi(ctx.Config(), ctx.ModuleDir()) { if c.canDumpAbi(ctx) { c.dumpAbi(ctx, nativeAbiResult.symbolList) if canDiffAbi(ctx.Config()) { c.diffAbi(ctx) Loading