bp2build: remove manifest file for bp2build-sync. am: 2b54eb8375
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1693286 Change-Id: I575a6df510d322878dcac9b331dedd5f4e7de82b
This commit is contained in:
@@ -18,7 +18,6 @@ import (
|
|||||||
"android/soong/android"
|
"android/soong/android"
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
"strings"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// Codegen is the backend of bp2build. The code generator is responsible for
|
// Codegen is the backend of bp2build. The code generator is responsible for
|
||||||
@@ -36,18 +35,12 @@ func Codegen(ctx *CodegenContext) CodegenMetrics {
|
|||||||
for _, f := range filesToWrite {
|
for _, f := range filesToWrite {
|
||||||
p := getOrCreateOutputDir(outputDir, ctx, f.Dir).Join(ctx, f.Basename)
|
p := getOrCreateOutputDir(outputDir, ctx, f.Dir).Join(ctx, f.Basename)
|
||||||
if err := writeFile(ctx, p, f.Contents); err != nil {
|
if err := writeFile(ctx, p, f.Contents); err != nil {
|
||||||
fmt.Errorf("Failed to write %q (dir %q) due to %q", f.Basename, f.Dir, err)
|
panic(fmt.Errorf("Failed to write %q (dir %q) due to %q", f.Basename, f.Dir, err))
|
||||||
}
|
}
|
||||||
// if these generated files are modified, regenerate on next run.
|
// if these generated files are modified, regenerate on next run.
|
||||||
generatedBuildFiles = append(generatedBuildFiles, p.String())
|
generatedBuildFiles = append(generatedBuildFiles, p.String())
|
||||||
}
|
}
|
||||||
|
|
||||||
// The MANIFEST file contains the full list of files generated by bp2build, excluding itself.
|
|
||||||
// Its purpose is for downstream tools to understand the set of files converted by bp2build.
|
|
||||||
manifestFile := outputDir.Join(ctx, "MANIFEST")
|
|
||||||
writeFile(ctx, manifestFile, strings.Join(generatedBuildFiles, "\n"))
|
|
||||||
generatedBuildFiles = append(generatedBuildFiles, manifestFile.String())
|
|
||||||
|
|
||||||
return metrics
|
return metrics
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user