diff options
author | Jayant Chowdhary <jchowdhary@google.com> | 2018-05-10 15:29:24 -0700 |
---|---|---|
committer | Jayant Chowdhary <jchowdhary@google.com> | 2018-05-14 18:34:40 -0700 |
commit | f267f715ebcde8f0dec9bfe168dc8c5dcfb93bc7 (patch) | |
tree | 6ccc8854b0cdd7dd77e326f6081acaca518adfa4 /cc | |
parent | 01dd3fb5043b1af6913292bd237d1ba08f57e623 (diff) | |
download | build_soong-f267f715ebcde8f0dec9bfe168dc8c5dcfb93bc7.tar.gz build_soong-f267f715ebcde8f0dec9bfe168dc8c5dcfb93bc7.tar.bz2 build_soong-f267f715ebcde8f0dec9bfe168dc8c5dcfb93bc7.zip |
Allow abi diffs sanitized variants of vndk libraries on production devices.
Previously abi diffs were allowed only on unsanitized variants of vndk
libraries. This CL allows them on all sanitized variants which go onto
production devices, eg: cfi variants.
Bug: 66301104
Test: Without this change, for arm64 libstagefright_foundation doesn't
get an lsdump file since we don't build an unsanitized variant
(aosp_arm64_ab).
Test: With this change, for arm64 libstagefright_foundation does
get an lsdump file (aosp_arm64_ab)
Merged-In: I94f82fd84fc898e4980c3f3619df9677ed723c32
Change-Id: I94f82fd84fc898e4980c3f3619df9677ed723c32
(cherry picked from commit b7e08ca83000f14653ffdd0bc4195067bb902dfc)
Diffstat (limited to 'cc')
-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 ee549bc0..86537347 100644 --- a/cc/sanitize.go +++ b/cc/sanitize.go @@ -535,6 +535,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: |