summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Dan Albert <danalbert@google.com> 2021-06-07 13:19:49 -0700
committer Dan Albert <danalbert@google.com> 2021-06-07 13:22:30 -0700
commitad66593085509b7e1b1f3e9a61b7c7b05d832788 (patch)
treef94a4d03481f789ce7430c38f67deb3e8e59c412
parent2f265950721b8871bb82d7e3fb8515e8d0b2f87e (diff)
Disable ABI dumps on Darwin.
I'm not sure why these targets are getting built as part of the sdk build anyway, but we don't need them. Test: treehugger Bug: http://b/156513478 Bug: http://b/190394921 Change-Id: I1ea0e75f459ad7cad648f96b67a4f2424d36fda7
-rw-r--r--cc/ndk_abi.go2
-rw-r--r--cc/ndk_library.go11
2 files changed, 7 insertions, 6 deletions
diff --git a/cc/ndk_abi.go b/cc/ndk_abi.go
index b9b57af2b..927fa2ec5 100644
--- a/cc/ndk_abi.go
+++ b/cc/ndk_abi.go
@@ -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)
}
}
diff --git a/cc/ndk_library.go b/cc/ndk_library.go
index f3d2ba169..a45838063 100644
--- a/cc/ndk_library.go
+++ b/cc/ndk_library.go
@@ -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)
}
}