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

Commit c835e6c6 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

Change-Id: I65e29cfe0ccad3a9ba9253d0ebc7c0d3c04a369c
parents 3c8fd299 3b98a509
Loading
Loading
Loading
Loading
+10 −4
Original line number Diff line number Diff line
@@ -1338,10 +1338,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.
	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
	}