diff options
author | 2022-04-14 23:08:51 +0000 | |
---|---|---|
committer | 2022-04-19 22:01:43 +0000 | |
commit | f71006a96264a95938fe0b212751302d69dd9121 (patch) | |
tree | bbd956c17a7b46bec6cdeba8651ff04e4d33354c | |
parent | 604086f988507b877e8e6aeb620b3c9a26630fb1 (diff) |
Disable ABI dumping for hwasan builds.
abidw doesn't currently handle top-byte-ignore correctly. Disable ABI
dumping for those configs while we wait for a fix. We'll still have
ABI checking coverage from non-hwasan builds.
Bug: http://b/190554910
Test: treehugger
Change-Id: I0e29979f8c212c43e0d1beea737abcd7fd0119d7
-rw-r--r-- | cc/ndk_abi.go | 2 | ||||
-rw-r--r-- | cc/ndk_library.go | 16 |
2 files changed, 14 insertions, 4 deletions
diff --git a/cc/ndk_abi.go b/cc/ndk_abi.go index 927fa2ec5..3456c32bb 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() { + if canDumpAbi(ctx.Config()) { depPaths = append(depPaths, installer.abiDumpPath) } } diff --git a/cc/ndk_library.go b/cc/ndk_library.go index 5f0262d74..5ef41eae5 100644 --- a/cc/ndk_library.go +++ b/cc/ndk_library.go @@ -321,8 +321,18 @@ func (this *stubDecorator) findPrebuiltAbiDump(ctx ModuleContext, } // Feature flag. -func canDumpAbi() bool { - return runtime.GOOS != "darwin" +func canDumpAbi(config android.Config) bool { + if runtime.GOOS == "darwin" { + return false + } + // abidw doesn't currently handle top-byte-ignore correctly. Disable ABI + // dumping for those configs while we wait for a fix. We'll still have ABI + // checking coverage from non-hwasan builds. + // http://b/190554910 + if android.InList("hwaddress", config.SanitizeDevice()) { + return false + } + return true } // Feature flag to disable diffing against prebuilts. @@ -458,7 +468,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() { + if canDumpAbi(ctx.Config()) { c.dumpAbi(ctx, nativeAbiResult.symbolList) if canDiffAbi() { c.diffAbi(ctx) |