Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fbe57803 authored by Dan Albert's avatar Dan Albert
Browse files

Disable ABI tracking for bionic.

This is being done with a path-based filter rather than as a property
of ndk_library because there would be no way to prevent people from
disabling ABI tracking without API council review if it were a
property, since there's no per-module OWNERS.

Bug: http://b/358653811
Test: m ndk
Change-Id: If6af638accc917294eee18cb08551c5df25462ad
parent c8b6feba
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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()) {
				if canDumpAbi(ctx.Config(), ctx.ModuleDir(module)) {
					depPaths = append(depPaths, installer.abiDumpPath)
				}
			}
+11 −2
Original line number Diff line number Diff line
@@ -321,10 +321,19 @@ func (this *stubDecorator) findPrebuiltAbiDump(ctx ModuleContext,
}

// Feature flag.
func canDumpAbi(config android.Config) bool {
func canDumpAbi(config android.Config, moduleDir string) bool {
	if runtime.GOOS == "darwin" {
		return false
	}
	if strings.HasPrefix(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
		// it until the workflow can be improved.
		//
		// http://b/358653811
		return false
	}
	// http://b/156513478
	return config.ReleaseNdkAbiMonitored()
}
@@ -460,7 +469,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()) {
	if canDumpAbi(ctx.Config(), ctx.ModuleDir()) {
		c.dumpAbi(ctx, nativeAbiResult.symbolList)
		if canDiffAbi(ctx.Config()) {
			c.diffAbi(ctx)