Don't use APEX prebuilts when asan is on

am: 50b81e532b

Change-Id: I74072aff547ae17930276bb9b45064e2efbde56b
This commit is contained in:
Jiyong Park
2019-07-15 15:20:09 -07:00
committed by android-build-merger

View File

@@ -1433,10 +1433,16 @@ func (p *Prebuilt) installable() bool {
}
func (p *Prebuilt) DepsMutator(ctx android.BottomUpMutatorContext) {
if ctx.Config().FlattenApex() && !ctx.Config().UnbundledBuild() && p.prebuilt.SourceExists() {
// If the device is configured to use flattened APEX, don't set
// p.properties.Source so that the prebuilt module (which is
// a non-flattened APEX) is not used.
// If the device is configured to use flattened APEX, don't set
// p.properties.Source so that the prebuilt module (which is
// a non-flattened APEX) is not used.
forceDisable := ctx.Config().FlattenApex() && !ctx.Config().UnbundledBuild()
// b/137216042 don't use prebuilts when address sanitizer is on
forceDisable = forceDisable || android.InList("address", ctx.Config().SanitizeDevice()) ||
android.InList("hwaddress", ctx.Config().SanitizeDevice())
if forceDisable && p.prebuilt.SourceExists() {
p.properties.ForceDisable = true
return
}