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)
Change-Id: I94f82fd84fc898e4980c3f3619df9677ed723c32
diff --git a/cc/sanitize.go b/cc/sanitize.go
index 859d876..a6898a2 100644
--- a/cc/sanitize.go
+++ b/cc/sanitize.go
@@ -539,6 +539,11 @@
!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: