Move bpglob to outside of the Ninja action graph. am: 6fbc68d41d
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/1879698 Change-Id: I67d9c22741b5e9e9816f0273a16f09d6aa00efc0
This commit is contained in:
commit
ffa095e33e
2 changed files with 4 additions and 22 deletions
|
@ -149,13 +149,6 @@ var (
|
|||
},
|
||||
"depfile")
|
||||
|
||||
noop = pctx.StaticRule("noop",
|
||||
blueprint.RuleParams{
|
||||
Command: "true",
|
||||
Description: "noop",
|
||||
Restat: true,
|
||||
})
|
||||
|
||||
_ = pctx.VariableFunc("ToolDir", func(config interface{}) (string, error) {
|
||||
return config.(BootstrapConfig).HostToolDir(), nil
|
||||
})
|
||||
|
@ -716,13 +709,6 @@ func (s *singleton) GenerateBuildActions(ctx blueprint.SingletonContext) {
|
|||
Inputs: blueprintGoPackages,
|
||||
Optional: true,
|
||||
})
|
||||
|
||||
// out/soong/bpglob is built by microfactory before any ninja runs, write a rule that
|
||||
// convinces ninja that it has been built to avoid tripping Soong's dangling rules check.
|
||||
ctx.Build(pctx, blueprint.BuildParams{
|
||||
Rule: noop,
|
||||
Outputs: []string{"$bootstrapGlobCmd"},
|
||||
})
|
||||
}
|
||||
|
||||
// packageRoot returns the module-specific package root directory path. This
|
||||
|
|
|
@ -44,12 +44,10 @@ import (
|
|||
// in a build failure with a "missing and no known rule to make it" error.
|
||||
|
||||
var (
|
||||
_ = pctx.VariableFunc("bootstrapGlobCmd", func(config interface{}) (string, error) {
|
||||
_ = pctx.VariableFunc("globCmd", func(config interface{}) (string, error) {
|
||||
return filepath.Join(config.(BootstrapConfig).SoongOutDir(), "bpglob"), nil
|
||||
})
|
||||
|
||||
_ = pctx.StaticVariable("primaryBuilderGlobCmd", filepath.Join("$ToolDir", "bpglob"))
|
||||
|
||||
// globRule rule traverses directories to produce a list of files that match $glob
|
||||
// and writes it to $out if it has changed, and writes the directories to $out.d
|
||||
GlobRule = pctx.StaticRule("GlobRule",
|
||||
|
@ -62,7 +60,7 @@ var (
|
|||
Deps: blueprint.DepsGCC,
|
||||
Depfile: "$out.d",
|
||||
},
|
||||
"args", "globCmd")
|
||||
"args")
|
||||
)
|
||||
|
||||
// GlobFileContext is the subset of ModuleContext and SingletonContext needed by GlobFile
|
||||
|
@ -84,8 +82,7 @@ func GlobFile(ctx GlobFileContext, pattern string, excludes []string, fileListFi
|
|||
Rule: GlobRule,
|
||||
Outputs: []string{fileListFile},
|
||||
Args: map[string]string{
|
||||
"args": args,
|
||||
"globCmd": "$primaryBuilderGlobCmd",
|
||||
"args": args,
|
||||
},
|
||||
Description: "glob " + pattern,
|
||||
})
|
||||
|
@ -116,8 +113,7 @@ func multipleGlobFilesRule(ctx GlobFileContext, fileListFile string, shard int,
|
|||
Rule: GlobRule,
|
||||
Outputs: []string{fileListFile},
|
||||
Args: map[string]string{
|
||||
"args": args.String(),
|
||||
"globCmd": "$bootstrapGlobCmd",
|
||||
"args": args.String(),
|
||||
},
|
||||
Description: fmt.Sprintf("regenerate globs shard %d of %d", shard, numGlobBuckets),
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue