Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bfda34e5 authored by Jiyong Park's avatar Jiyong Park Committed by android-build-merger
Browse files

Don't use APEX prebuilts when asan is on am: 3b98a509 am: c835e6c6

am: 77911437

Change-Id: I0e914922baed0fcbf12ef3c22aec95216860ea62
parents 8eeee286 77911437
Loading
Loading
Loading
Loading
+10 −4
Original line number Original line Diff line number Diff line
@@ -1433,10 +1433,16 @@ func (p *Prebuilt) installable() bool {
}
}


func (p *Prebuilt) DepsMutator(ctx android.BottomUpMutatorContext) {
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
	// If the device is configured to use flattened APEX, don't set
	// p.properties.Source so that the prebuilt module (which is
	// p.properties.Source so that the prebuilt module (which is
	// a non-flattened APEX) is not used.
	// 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
		p.properties.ForceDisable = true
		return
		return
	}
	}