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
This commit is contained in:
6
cc/cc.go
6
cc/cc.go
@@ -552,13 +552,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 {
|
||||
|
@@ -539,6 +539,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:
|
||||
|
Reference in New Issue
Block a user