Delete creation of empty glob file am: 3a495910ad am: 78f4755aaa

Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/1736533

Change-Id: I4e56ca0611817fca2723821ed3b7f34fe11a8bbf
This commit is contained in:
Spandan Das 2021-06-15 20:06:53 +00:00 committed by Automerger Merge Worker
commit ff59682013

View file

@ -120,20 +120,6 @@ func PrimaryBuilderExtraFlags(args Args, globFile, mainNinjaFile string) []strin
return result
}
func writeEmptyGlobFile(path string) {
err := os.MkdirAll(filepath.Dir(path), 0777)
if err != nil {
fatalf("Failed to create parent directories of empty ninja glob file '%s': %s", path, err)
}
if _, err := os.Stat(path); os.IsNotExist(err) {
err = ioutil.WriteFile(path, nil, 0666)
if err != nil {
fatalf("Failed to create empty ninja glob file '%s': %s", path, err)
}
}
}
// Returns the list of dependencies the emitted Ninja files has. These can be
// written to the .d file for the output so that it is correctly rebuilt when
// needed in case Blueprint is itself invoked from Ninja
@ -191,8 +177,6 @@ func RunBlueprint(args Args, ctx *blueprint.Context, config interface{}) []strin
primaryBuilderNinjaGlobFile := absolutePath(filepath.Join(args.BuildDir, bootstrapSubDir, "build-globs.ninja"))
mainNinjaFile := filepath.Join("$buildDir", "build.ninja")
writeEmptyGlobFile(primaryBuilderNinjaGlobFile)
var invocations []PrimaryBuilderInvocation
if args.PrimaryBuilderInvocations != nil {