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

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

Merge "Invoke writeNinjaHint for only actual build"

parents 1f65e0d0 591366dd
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -133,6 +133,10 @@ func runMixedModeBuild(ctx *android.Context, extraNinjaDeps []string) string {
	ninjaDeps = append(ninjaDeps, writeBuildGlobsNinjaFile(ctx)...)

	writeDepFile(cmdlineArgs.OutFile, ctx.EventHandler, ninjaDeps)

	if ctx.Config().IsEnvTrue("SOONG_GENERATES_NINJA_HINT") {
		writeNinjaHint(ctx)
	}
	return cmdlineArgs.OutFile
}

@@ -455,6 +459,9 @@ func runSoongOnlyBuild(ctx *android.Context, extraNinjaDeps []string) string {
		// The actual output (build.ninja) was written in the RunBlueprint() call
		// above
		writeDepFile(cmdlineArgs.OutFile, ctx.EventHandler, ninjaDeps)
		if ctx.Config().IsEnvTrue("SOONG_GENERATES_NINJA_HINT") {
			writeNinjaHint(ctx)
		}
		return cmdlineArgs.OutFile
	}
}
@@ -535,9 +542,6 @@ func main() {
		} else {
			finalOutputFile = runSoongOnlyBuild(ctx, extraNinjaDeps)
		}
		if ctx.Config().IsEnvTrue("SOONG_GENERATES_NINJA_HINT") {
			writeNinjaHint(ctx)
		}
		writeMetrics(configuration, ctx.EventHandler, metricsDir)
	}
	writeUsedEnvironmentFile(configuration)