Disable ABI dumps on Darwin. am: ad66593085

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1729472

Change-Id: I83b96688bc129e6f62e4b91427c554f363bc09ee
This commit is contained in:
Dan Albert
2021-06-08 00:10:16 +00:00
committed by Automerger Merge Worker
2 changed files with 7 additions and 6 deletions

View File

@@ -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(m) {
if canDumpAbi() {
depPaths = append(depPaths, installer.abiDumpPath)
}
}

View File

@@ -17,6 +17,7 @@ package cc
import (
"fmt"
"path/filepath"
"runtime"
"strings"
"sync"
@@ -332,12 +333,12 @@ func (this *stubDecorator) findPrebuiltAbiDump(ctx ModuleContext,
}
// Feature flag.
func canDumpAbi(module android.Module) bool {
return true
func canDumpAbi() bool {
return runtime.GOOS != "darwin"
}
// Feature flag to disable diffing against prebuilts.
func canDiffAbi(module android.Module) bool {
func canDiffAbi() bool {
return false
}
@@ -452,9 +453,9 @@ 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.Module()) {
if canDumpAbi() {
c.dumpAbi(ctx, nativeAbiResult.symbolList)
if canDiffAbi(ctx.Module()) {
if canDiffAbi() {
c.diffAbi(ctx)
}
}