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

Commit efdc4f4d authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Allow static binaries to enable AFDO"

parents eb76d218 88e632e2
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -93,7 +93,13 @@ func (props *AfdoProperties) GetAfdoProfileFile(ctx android.BaseModuleContext, m
}

func (afdo *afdo) begin(ctx BaseModuleContext) {
	if afdo.Properties.Afdo && !ctx.static() && !ctx.Host() {
	if ctx.Host() {
		return
	}
	if ctx.static() && !ctx.staticBinary() {
		return
	}
	if afdo.Properties.Afdo {
		module := ctx.ModuleName()
		if afdo.Properties.GetAfdoProfileFile(ctx, module).Valid() {
			afdo.Properties.AfdoTarget = proptools.StringPtr(module)