Add a new CreateSoongInjectionDirFiles function

- This is a wrapper function for all files in soong_injection directory.
This should prevent an error in the workspace generated for
api_bp2build.
- Rename the existing CreateSoongInjectionFiles fn and make it package
  private to prevent confusion

(The subsequent CL in this stack should contain a smoke test for
api_bp2build)

Test: b build //:empty --config=api_bp2build --config=android
Test: TH
Change-Id: Iddb0aa1aff2f709826edd587aa99fccddf80f08f
This commit is contained in:
Spandan Das
2023-01-11 02:50:00 +00:00
parent 57b1e4064b
commit 83e787e837
4 changed files with 20 additions and 9 deletions

View File

@@ -20,7 +20,8 @@ type BazelFile struct {
Contents string
}
func CreateSoongInjectionFiles(cfg android.Config, metrics CodegenMetrics) []BazelFile {
// PRIVATE: Use CreateSoongInjectionDirFiles instead
func soongInjectionFiles(cfg android.Config, metrics CodegenMetrics) []BazelFile {
var files []BazelFile
files = append(files, newFile("android", GeneratedBuildFileName, "")) // Creates a //cc_toolchain package.