diff options
author | 2025-02-04 16:27:10 -0800 | |
---|---|---|
committer | 2025-02-04 16:27:10 -0800 | |
commit | 2faf92bd973376053fa0c8386a61e2acc6f0591f (patch) | |
tree | b552cb96e346ccffbed1b04bbf0f0ecb0879ad7b | |
parent | 4bf1e166bbfbdb20877e21b3b78984f4e4b07a36 (diff) | |
parent | 68fb7cb68da47e36d80285e69b1d597ea7d6dbea (diff) |
Merge changes I5057c2cc,I83ac66c6 into main
* changes:
Fixes for missing rules in m --soong-only
Install intermediate file in testcases
-rw-r--r-- | android/module_context.go | 3 | ||||
-rw-r--r-- | fsgen/filesystem_creator.go | 4 | ||||
-rw-r--r-- | golang/golang.go | 2 | ||||
-rw-r--r-- | java/java.go | 4 |
4 files changed, 10 insertions, 3 deletions
diff --git a/android/module_context.go b/android/module_context.go index a3dad93f5..d3c537097 100644 --- a/android/module_context.go +++ b/android/module_context.go @@ -639,6 +639,9 @@ func (m *moduleContext) packageFile(fullInstallPath InstallPath, srcPath Path, e func (m *moduleContext) installFile(installPath InstallPath, name string, srcPath Path, deps []InstallPath, executable bool, hooks bool, checkbuild bool, extraZip *extraFilesZip) InstallPath { + if _, ok := srcPath.(InstallPath); ok { + m.ModuleErrorf("Src path cannot be another installed file. Please use a path from source or intermediates instead.") + } fullInstallPath := installPath.Join(m, name) if hooks { diff --git a/fsgen/filesystem_creator.go b/fsgen/filesystem_creator.go index 9dcbec1c0..63d079125 100644 --- a/fsgen/filesystem_creator.go +++ b/fsgen/filesystem_creator.go @@ -1163,6 +1163,10 @@ func (f *filesystemCreator) GenerateAndroidBuildActions(ctx android.ModuleContex ctx.Phony("product_config_to_bp", generatedBp) + if !ctx.Config().KatiEnabled() { + // Cannot diff since the kati packaging rules will not be created. + return + } var diffTestFiles []android.Path for _, partitionType := range partitions.types() { diffTestFile := f.createFileListDiffTest(ctx, partitionType, partitions.nameForType(partitionType)) diff --git a/golang/golang.go b/golang/golang.go index 3422f8bdf..9e0744aaf 100644 --- a/golang/golang.go +++ b/golang/golang.go @@ -101,7 +101,7 @@ func (g *GoBinary) GenerateAndroidBuildActions(ctx android.ModuleContext) { // Modules in an unexported namespace have no install rule, only add modules in the exported namespaces // to the blueprint_tools phony rules. - if (!ctx.Config().KatiEnabled() || g.ExportedToMake()) && !usedByBootstrap(ctx.ModuleName()) { + if g.ExportedToMake() && !usedByBootstrap(ctx.ModuleName()) { // Don't add the installed file of bootstrap tools to the deps of `blueprint_tools`. // The install command line will differ from what was used during bootstrap, // which will cause ninja to rebuild the module on the next run, diff --git a/java/java.go b/java/java.go index cd97ce0e9..900f0e32f 100644 --- a/java/java.go +++ b/java/java.go @@ -1888,8 +1888,8 @@ func (j *Test) generateAndroidBuildActionsWithConfig(ctx android.ModuleContext, dataPath := android.DataPath{SrcPath: data} ctx.InstallTestData(pathInTestCases, []android.DataPath{dataPath}) } - if j.installFile != nil { - ctx.InstallFile(pathInTestCases, ctx.ModuleName()+".jar", j.installFile) + if j.outputFile != nil { + ctx.InstallFile(pathInTestCases, ctx.ModuleName()+".jar", j.outputFile) } } } |