diff options
author | Vishwath Mohan <vishwath@google.com> | 2018-05-23 17:47:38 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2018-05-23 17:47:38 +0000 |
commit | 165e01b744fe42cf700e388f7e0fb874966a6bfc (patch) | |
tree | c8cc45d35e6196ca2ba181bf6d868076ba08113d | |
parent | 683444e40f552f7b1d71ed777c7c58a769c2ec72 (diff) | |
parent | f267f715ebcde8f0dec9bfe168dc8c5dcfb93bc7 (diff) | |
download | build_soong-165e01b744fe42cf700e388f7e0fb874966a6bfc.tar.gz build_soong-165e01b744fe42cf700e388f7e0fb874966a6bfc.tar.bz2 build_soong-165e01b744fe42cf700e388f7e0fb874966a6bfc.zip |
Merge "Allow abi diffs sanitized variants of vndk libraries on production devices." into pi-dev
-rw-r--r-- | cc/cc.go | 6 | ||||
-rw-r--r-- | cc/sanitize.go | 5 |
2 files changed, 8 insertions, 3 deletions
@@ -540,13 +540,13 @@ func (ctx *moduleContextImpl) isVndkExt() bool { // Create source abi dumps if the module belongs to the list of VndkLibraries. func (ctx *moduleContextImpl) createVndkSourceAbiDump() bool { skipAbiChecks := ctx.ctx.Config().IsEnvTrue("SKIP_ABI_CHECKS") - isUnsanitizedVariant := true + isVariantOnProductionDevice := true sanitize := ctx.mod.sanitize if sanitize != nil { - isUnsanitizedVariant = sanitize.isUnsanitizedVariant() + isVariantOnProductionDevice = sanitize.isVariantOnProductionDevice() } vendorAvailable := Bool(ctx.mod.VendorProperties.Vendor_available) - return !skipAbiChecks && isUnsanitizedVariant && ctx.ctx.Device() && ((ctx.useVndk() && ctx.isVndk() && vendorAvailable) || inList(ctx.baseModuleName(), llndkLibraries)) + return !skipAbiChecks && isVariantOnProductionDevice && ctx.ctx.Device() && ((ctx.useVndk() && ctx.isVndk() && vendorAvailable) || inList(ctx.baseModuleName(), llndkLibraries)) } func (ctx *moduleContextImpl) selectedStl() string { diff --git a/cc/sanitize.go b/cc/sanitize.go index 23a7be44..fc44eaf1 100644 --- a/cc/sanitize.go +++ b/cc/sanitize.go @@ -538,6 +538,11 @@ func (sanitize *sanitize) isUnsanitizedVariant() bool { !sanitize.isSanitizerEnabled(cfi) } +func (sanitize *sanitize) isVariantOnProductionDevice() bool { + return !sanitize.isSanitizerEnabled(asan) && + !sanitize.isSanitizerEnabled(tsan) +} + func (sanitize *sanitize) SetSanitizer(t sanitizerType, b bool) { switch t { case asan: |