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

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

Merge "Fix incrementality bug with merged BUILD files"

parents aa981edc fd88414b
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -285,6 +285,17 @@ func plantSymlinkForestRecursive(cfg android.Config, topdir string, forestDir st
			// Neither is a directory. Merge them.
			srcBuildFile := shared.JoinPath(topdir, srcChild)
			generatedBuildFile := shared.JoinPath(topdir, buildFilesChild)
			// Add the src and generated build files as dependencies so that bp2build
			// is rerun when they change. Currently, this is only really necessary
			// for srcBuildFile, because if we regenerate the generated build files
			// we will always rerun the symlink forest generation as well. If that
			// is later split up into separate, fully dependency-tracing steps, then
			// we'll need srcBuildFile as well. Adding srcBuildFile here today
			// technically makes it a dependency of bp2build_workspace_marker, which
			// also implicitly outputs that file, but since bp2build_workspace_marker
			// will always have a newer timestamp than the generatedBuildFile it
			// shouldn't be a problem.
			*acc = append(*acc, srcBuildFile, generatedBuildFile)
			err = mergeBuildFiles(shared.JoinPath(topdir, forestChild), srcBuildFile, generatedBuildFile, cfg.IsEnvTrue("BP2BUILD_VERBOSE"))
			if err != nil {
				fmt.Fprintf(os.Stderr, "Error merging %s and %s: %s",