aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVishwath Mohan <vishwath@google.com>2018-05-23 17:47:38 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2018-05-23 17:47:38 +0000
commit165e01b744fe42cf700e388f7e0fb874966a6bfc (patch)
treec8cc45d35e6196ca2ba181bf6d868076ba08113d
parent683444e40f552f7b1d71ed777c7c58a769c2ec72 (diff)
parentf267f715ebcde8f0dec9bfe168dc8c5dcfb93bc7 (diff)
downloadbuild_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.go6
-rw-r--r--cc/sanitize.go5
2 files changed, 8 insertions, 3 deletions
diff --git a/cc/cc.go b/cc/cc.go
index 50766fa0..ca3f8726 100644
--- a/cc/cc.go
+++ b/cc/cc.go
@@ -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: