Merge "metric namespace for symlink_forest"
This commit is contained in:
committed by
Gerrit Code Review
commit
c61e3c2789
@@ -629,6 +629,7 @@ func bazelArtifacts() []string {
|
|||||||
// symlink tree creation binary. Then the latter would not need to depend on
|
// symlink tree creation binary. Then the latter would not need to depend on
|
||||||
// the very heavy-weight machinery of soong_build .
|
// the very heavy-weight machinery of soong_build .
|
||||||
func runSymlinkForestCreation(configuration android.Config, ctx *android.Context, extraNinjaDeps []string, metricsDir string) string {
|
func runSymlinkForestCreation(configuration android.Config, ctx *android.Context, extraNinjaDeps []string, metricsDir string) string {
|
||||||
|
ctx.EventHandler.Do("symlink_forest", func() {
|
||||||
var ninjaDeps []string
|
var ninjaDeps []string
|
||||||
ninjaDeps = append(ninjaDeps, extraNinjaDeps...)
|
ninjaDeps = append(ninjaDeps, extraNinjaDeps...)
|
||||||
|
|
||||||
@@ -653,9 +654,8 @@ func runSymlinkForestCreation(configuration android.Config, ctx *android.Context
|
|||||||
|
|
||||||
// PlantSymlinkForest() returns all the directories that were readdir()'ed.
|
// PlantSymlinkForest() returns all the directories that were readdir()'ed.
|
||||||
// Such a directory SHOULD be added to `ninjaDeps` so that a child directory
|
// Such a directory SHOULD be added to `ninjaDeps` so that a child directory
|
||||||
// or file created/deleted under it would trigger an update of the symlink
|
// or file created/deleted under it would trigger an update of the symlink forest.
|
||||||
// forest.
|
ctx.EventHandler.Do("plant", func() {
|
||||||
ctx.EventHandler.Do("symlink_forest", func() {
|
|
||||||
symlinkForestDeps := bp2build.PlantSymlinkForest(
|
symlinkForestDeps := bp2build.PlantSymlinkForest(
|
||||||
configuration.IsEnvTrue("BP2BUILD_VERBOSE"), topDir, workspaceRoot, generatedRoot, excludes)
|
configuration.IsEnvTrue("BP2BUILD_VERBOSE"), topDir, workspaceRoot, generatedRoot, excludes)
|
||||||
ninjaDeps = append(ninjaDeps, symlinkForestDeps...)
|
ninjaDeps = append(ninjaDeps, symlinkForestDeps...)
|
||||||
@@ -663,6 +663,7 @@ func runSymlinkForestCreation(configuration android.Config, ctx *android.Context
|
|||||||
|
|
||||||
writeDepFile(symlinkForestMarker, ctx.EventHandler, ninjaDeps)
|
writeDepFile(symlinkForestMarker, ctx.EventHandler, ninjaDeps)
|
||||||
touch(shared.JoinPath(topDir, symlinkForestMarker))
|
touch(shared.JoinPath(topDir, symlinkForestMarker))
|
||||||
|
})
|
||||||
codegenMetrics := bp2build.ReadCodegenMetrics(metricsDir)
|
codegenMetrics := bp2build.ReadCodegenMetrics(metricsDir)
|
||||||
if codegenMetrics == nil {
|
if codegenMetrics == nil {
|
||||||
m := bp2build.CreateCodegenMetrics()
|
m := bp2build.CreateCodegenMetrics()
|
||||||
|
Reference in New Issue
Block a user