[conflict] Merge "PrebuildEtcModule no longer implements OutputFiles method" into main am: 3125b75d5d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3123797 Change-Id: I9acefd1def06cefc153514c766489b341fa86b2e Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> Ignore-AOSP-First: to resolve merge conflict
This commit is contained in:
@@ -2114,7 +2114,7 @@ func (a *apexBundle) depVisitor(vctx *visitorContext, ctx android.ModuleContext,
|
||||
}
|
||||
case prebuiltTag:
|
||||
if prebuilt, ok := child.(prebuilt_etc.PrebuiltEtcModule); ok {
|
||||
filesToCopy, _ := prebuilt.OutputFiles("")
|
||||
filesToCopy := android.OutputFilesForModule(ctx, prebuilt, "")
|
||||
for _, etcFile := range filesToCopy {
|
||||
vctx.filesInfo = append(vctx.filesInfo, apexFileForPrebuiltEtc(ctx, prebuilt, etcFile))
|
||||
}
|
||||
@@ -2251,7 +2251,7 @@ func (a *apexBundle) depVisitor(vctx *visitorContext, ctx android.ModuleContext,
|
||||
// Because APK-in-APEX embeds jni_libs transitively, we don't need to track transitive deps
|
||||
} else if java.IsXmlPermissionsFileDepTag(depTag) {
|
||||
if prebuilt, ok := child.(prebuilt_etc.PrebuiltEtcModule); ok {
|
||||
filesToCopy, _ := prebuilt.OutputFiles("")
|
||||
filesToCopy := android.OutputFilesForModule(ctx, prebuilt, "")
|
||||
for _, etcFile := range filesToCopy {
|
||||
vctx.filesInfo = append(vctx.filesInfo, apexFileForPrebuiltEtc(ctx, prebuilt, etcFile))
|
||||
}
|
||||
|
@@ -15,10 +15,11 @@
|
||||
package cc
|
||||
|
||||
import (
|
||||
"android/soong/android"
|
||||
"android/soong/etc"
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"android/soong/android"
|
||||
"android/soong/etc"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -97,7 +98,6 @@ type llndkLibrariesTxtModule struct {
|
||||
}
|
||||
|
||||
var _ etc.PrebuiltEtcModule = &llndkLibrariesTxtModule{}
|
||||
var _ android.OutputFileProducer = &llndkLibrariesTxtModule{}
|
||||
|
||||
// llndk_libraries_txt is a singleton module whose content is a list of LLNDK libraries
|
||||
// generated by Soong but can be referenced by other modules.
|
||||
@@ -119,6 +119,8 @@ func (txt *llndkLibrariesTxtModule) GenerateAndroidBuildActions(ctx android.Modu
|
||||
|
||||
installPath := android.PathForModuleInstall(ctx, "etc")
|
||||
ctx.InstallFile(installPath, filename, txt.outputFile)
|
||||
|
||||
ctx.SetOutputFiles(android.Paths{txt.outputFile}, "")
|
||||
}
|
||||
|
||||
func getVndkFileName(m *Module) (string, error) {
|
||||
@@ -172,11 +174,6 @@ func (txt *llndkLibrariesTxtModule) MakeVars(ctx android.MakeVarsContext) {
|
||||
ctx.Strict("LLNDK_LIBRARIES", strings.Join(txt.moduleNames, " "))
|
||||
}
|
||||
|
||||
// PrebuiltEtcModule interface
|
||||
func (txt *llndkLibrariesTxtModule) OutputFile() android.OutputPath {
|
||||
return txt.outputFile
|
||||
}
|
||||
|
||||
// PrebuiltEtcModule interface
|
||||
func (txt *llndkLibrariesTxtModule) BaseDir() string {
|
||||
return "etc"
|
||||
|
@@ -1792,7 +1792,6 @@ type sanitizerLibrariesTxtModule struct {
|
||||
}
|
||||
|
||||
var _ etc.PrebuiltEtcModule = (*sanitizerLibrariesTxtModule)(nil)
|
||||
var _ android.OutputFileProducer = (*sanitizerLibrariesTxtModule)(nil)
|
||||
|
||||
func RegisterSanitizerLibrariesTxtType(ctx android.RegistrationContext) {
|
||||
ctx.RegisterModuleType("sanitizer_libraries_txt", sanitizerLibrariesTxtFactory)
|
||||
@@ -1880,6 +1879,8 @@ func (txt *sanitizerLibrariesTxtModule) GenerateAndroidBuildActions(ctx android.
|
||||
|
||||
installPath := android.PathForModuleInstall(ctx, "etc")
|
||||
ctx.InstallFile(installPath, filename, txt.outputFile)
|
||||
|
||||
ctx.SetOutputFiles(android.Paths{txt.outputFile}, "")
|
||||
}
|
||||
|
||||
func (txt *sanitizerLibrariesTxtModule) AndroidMkEntries() []android.AndroidMkEntries {
|
||||
@@ -1889,11 +1890,6 @@ func (txt *sanitizerLibrariesTxtModule) AndroidMkEntries() []android.AndroidMkEn
|
||||
}}
|
||||
}
|
||||
|
||||
// PrebuiltEtcModule interface
|
||||
func (txt *sanitizerLibrariesTxtModule) OutputFile() android.OutputPath {
|
||||
return txt.outputFile
|
||||
}
|
||||
|
||||
// PrebuiltEtcModule interface
|
||||
func (txt *sanitizerLibrariesTxtModule) BaseDir() string {
|
||||
return "etc"
|
||||
|
@@ -133,10 +133,6 @@ type PrebuiltEtcModule interface {
|
||||
|
||||
// Returns the sub install directory relative to BaseDir().
|
||||
SubDir() string
|
||||
|
||||
// Returns an android.OutputPath to the intermediate file, which is the renamed prebuilt source
|
||||
// file.
|
||||
OutputFiles(tag string) (android.Paths, error)
|
||||
}
|
||||
|
||||
type PrebuiltEtc struct {
|
||||
|
@@ -3252,11 +3252,6 @@ func (module *sdkLibraryXml) SubDir() string {
|
||||
return "permissions"
|
||||
}
|
||||
|
||||
// from android.PrebuiltEtcModule
|
||||
func (module *sdkLibraryXml) OutputFiles(tag string) (android.Paths, error) {
|
||||
return android.OutputPaths{module.outputFilePath}.Paths(), nil
|
||||
}
|
||||
|
||||
var _ etc.PrebuiltEtcModule = (*sdkLibraryXml)(nil)
|
||||
|
||||
// from android.ApexModule
|
||||
@@ -3400,6 +3395,8 @@ func (module *sdkLibraryXml) GenerateAndroidBuildActions(ctx android.ModuleConte
|
||||
|
||||
module.installDirPath = android.PathForModuleInstall(ctx, "etc", module.SubDir())
|
||||
ctx.PackageFile(module.installDirPath, libName+".xml", module.outputFilePath)
|
||||
|
||||
ctx.SetOutputFiles(android.OutputPaths{module.outputFilePath}.Paths(), "")
|
||||
}
|
||||
|
||||
func (module *sdkLibraryXml) AndroidMkEntries() []android.AndroidMkEntries {
|
||||
|
@@ -15,7 +15,6 @@
|
||||
package linkerconfig
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
@@ -73,17 +72,6 @@ func (l *linkerConfig) OutputFile() android.OutputPath {
|
||||
return l.outputFilePath
|
||||
}
|
||||
|
||||
var _ android.OutputFileProducer = (*linkerConfig)(nil)
|
||||
|
||||
func (l *linkerConfig) OutputFiles(tag string) (android.Paths, error) {
|
||||
switch tag {
|
||||
case "":
|
||||
return android.Paths{l.outputFilePath}, nil
|
||||
default:
|
||||
return nil, fmt.Errorf("unsupported module reference tag %q", tag)
|
||||
}
|
||||
}
|
||||
|
||||
func (l *linkerConfig) GenerateAndroidBuildActions(ctx android.ModuleContext) {
|
||||
input := android.PathForModuleSrc(ctx, android.String(l.properties.Src))
|
||||
output := android.PathForModuleOut(ctx, "linker.config.pb").OutputPath
|
||||
@@ -98,6 +86,8 @@ func (l *linkerConfig) GenerateAndroidBuildActions(ctx android.ModuleContext) {
|
||||
l.SkipInstall()
|
||||
}
|
||||
ctx.InstallFile(l.installDirPath, l.outputFilePath.Base(), l.outputFilePath)
|
||||
|
||||
ctx.SetOutputFiles(android.Paths{l.outputFilePath}, "")
|
||||
}
|
||||
|
||||
func BuildLinkerConfig(ctx android.ModuleContext, builder *android.RuleBuilder,
|
||||
|
Reference in New Issue
Block a user