Move ModuleContext.ModuleBuild to ModuleContext.Build
Now that android.ModuleContext does not include blueprint.ModuleContext we can rename android.ModuleContext.ModuleBuild to android.ModuleContext.Build without colliding with blueprint.ModuleContext.Build. Leave ModuleBuild as a wrapper around Build for now to avoid having to update all the users outside build/soong simultaneously. Test: m checkbuild Change-Id: I18eb8cc04faf002049a11d9aac97e9732ff5d638
This commit is contained in:
parent
3f68a1362b
commit
ae88703df5
17 changed files with 71 additions and 76 deletions
|
@ -32,7 +32,7 @@ var (
|
|||
HostExecutable = "host_executable"
|
||||
)
|
||||
|
||||
type ModuleBuildParams struct {
|
||||
type BuildParams struct {
|
||||
Rule blueprint.Rule
|
||||
Deps blueprint.Deps
|
||||
Depfile WritablePath
|
||||
|
@ -50,6 +50,8 @@ type ModuleBuildParams struct {
|
|||
Args map[string]string
|
||||
}
|
||||
|
||||
type ModuleBuildParams BuildParams
|
||||
|
||||
type androidBaseContext interface {
|
||||
Target() Target
|
||||
TargetPrimary() bool
|
||||
|
@ -75,8 +77,7 @@ type ModuleContext interface {
|
|||
androidBaseContext
|
||||
blueprint.BaseModuleContext
|
||||
|
||||
// Similar to Build, but takes Paths instead of []string,
|
||||
// and performs more verification.
|
||||
// Deprecated: use ModuleContext.Build instead.
|
||||
ModuleBuild(pctx blueprint.PackageContext, params ModuleBuildParams)
|
||||
|
||||
ExpandSources(srcFiles, excludes []string) Paths
|
||||
|
@ -115,7 +116,9 @@ type ModuleContext interface {
|
|||
|
||||
Variable(pctx blueprint.PackageContext, name, value string)
|
||||
Rule(pctx blueprint.PackageContext, name string, params blueprint.RuleParams, argNames ...string) blueprint.Rule
|
||||
Build(pctx blueprint.PackageContext, params blueprint.BuildParams)
|
||||
// Similar to blueprint.ModuleContext.Build, but takes Paths instead of []string,
|
||||
// and performs more verification.
|
||||
Build(pctx blueprint.PackageContext, params BuildParams)
|
||||
|
||||
PrimaryModule() blueprint.Module
|
||||
FinalModule() blueprint.Module
|
||||
|
@ -144,7 +147,7 @@ type Module interface {
|
|||
AddProperties(props ...interface{})
|
||||
GetProperties() []interface{}
|
||||
|
||||
BuildParamsForTests() []ModuleBuildParams
|
||||
BuildParamsForTests() []BuildParams
|
||||
}
|
||||
|
||||
type nameProperties struct {
|
||||
|
@ -330,7 +333,7 @@ type ModuleBase struct {
|
|||
registerProps []interface{}
|
||||
|
||||
// For tests
|
||||
buildParams []ModuleBuildParams
|
||||
buildParams []BuildParams
|
||||
}
|
||||
|
||||
func (a *ModuleBase) AddProperties(props ...interface{}) {
|
||||
|
@ -341,7 +344,7 @@ func (a *ModuleBase) GetProperties() []interface{} {
|
|||
return a.registerProps
|
||||
}
|
||||
|
||||
func (a *ModuleBase) BuildParamsForTests() []ModuleBuildParams {
|
||||
func (a *ModuleBase) BuildParamsForTests() []BuildParams {
|
||||
return a.buildParams
|
||||
}
|
||||
|
||||
|
@ -586,7 +589,7 @@ type androidModuleContext struct {
|
|||
module Module
|
||||
|
||||
// For tests
|
||||
buildParams []ModuleBuildParams
|
||||
buildParams []BuildParams
|
||||
}
|
||||
|
||||
func (a *androidModuleContext) ninjaError(desc string, outputs []string, err error) {
|
||||
|
@ -602,19 +605,11 @@ func (a *androidModuleContext) ninjaError(desc string, outputs []string, err err
|
|||
return
|
||||
}
|
||||
|
||||
func (a *androidModuleContext) Build(pctx blueprint.PackageContext, params blueprint.BuildParams) {
|
||||
if a.missingDeps != nil {
|
||||
a.ninjaError(params.Description, params.Outputs,
|
||||
fmt.Errorf("module %s missing dependencies: %s\n",
|
||||
a.ModuleName(), strings.Join(a.missingDeps, ", ")))
|
||||
return
|
||||
}
|
||||
|
||||
params.Optional = true
|
||||
a.ModuleContext.Build(pctx, params)
|
||||
func (a *androidModuleContext) ModuleBuild(pctx blueprint.PackageContext, params ModuleBuildParams) {
|
||||
a.Build(pctx, BuildParams(params))
|
||||
}
|
||||
|
||||
func (a *androidModuleContext) ModuleBuild(pctx blueprint.PackageContext, params ModuleBuildParams) {
|
||||
func (a *androidModuleContext) Build(pctx blueprint.PackageContext, params BuildParams) {
|
||||
if a.config.captureBuild {
|
||||
a.buildParams = append(a.buildParams, params)
|
||||
}
|
||||
|
@ -782,7 +777,7 @@ func (a *androidModuleContext) installFile(installPath OutputPath, name string,
|
|||
orderOnlyDeps = deps
|
||||
}
|
||||
|
||||
a.ModuleBuild(pctx, ModuleBuildParams{
|
||||
a.Build(pctx, BuildParams{
|
||||
Rule: rule,
|
||||
Description: "install " + fullInstallPath.Base(),
|
||||
Output: fullInstallPath,
|
||||
|
@ -804,7 +799,7 @@ func (a *androidModuleContext) InstallSymlink(installPath OutputPath, name strin
|
|||
|
||||
if !a.skipInstall(fullInstallPath) {
|
||||
|
||||
a.ModuleBuild(pctx, ModuleBuildParams{
|
||||
a.Build(pctx, BuildParams{
|
||||
Rule: Symlink,
|
||||
Description: "install symlink " + fullInstallPath.Base(),
|
||||
Output: fullInstallPath,
|
||||
|
|
|
@ -86,7 +86,7 @@ func (m TestingModule) Module() Module {
|
|||
return m.module
|
||||
}
|
||||
|
||||
func (m TestingModule) Rule(rule string) ModuleBuildParams {
|
||||
func (m TestingModule) Rule(rule string) BuildParams {
|
||||
for _, p := range m.module.BuildParamsForTests() {
|
||||
if strings.Contains(p.Rule.String(), rule) {
|
||||
return p
|
||||
|
@ -95,7 +95,7 @@ func (m TestingModule) Rule(rule string) ModuleBuildParams {
|
|||
panic(fmt.Errorf("couldn't find rule %q", rule))
|
||||
}
|
||||
|
||||
func (m TestingModule) Description(desc string) ModuleBuildParams {
|
||||
func (m TestingModule) Description(desc string) BuildParams {
|
||||
for _, p := range m.module.BuildParamsForTests() {
|
||||
if p.Description == desc {
|
||||
return p
|
||||
|
@ -104,7 +104,7 @@ func (m TestingModule) Description(desc string) ModuleBuildParams {
|
|||
panic(fmt.Errorf("couldn't find description %q", desc))
|
||||
}
|
||||
|
||||
func (m TestingModule) Output(file string) ModuleBuildParams {
|
||||
func (m TestingModule) Output(file string) BuildParams {
|
||||
for _, p := range m.module.BuildParamsForTests() {
|
||||
outputs := append(WritablePaths(nil), p.Outputs...)
|
||||
if p.Output != nil {
|
||||
|
|
|
@ -341,7 +341,7 @@ func TransformSourceToObj(ctx android.ModuleContext, subdir string, srcFiles and
|
|||
|
||||
switch srcFile.Ext() {
|
||||
case ".asm":
|
||||
ctx.ModuleBuild(pctx, android.ModuleBuildParams{
|
||||
ctx.Build(pctx, android.BuildParams{
|
||||
Rule: yasm,
|
||||
Description: "yasm " + srcFile.Rel(),
|
||||
Output: objFile,
|
||||
|
@ -353,7 +353,7 @@ func TransformSourceToObj(ctx android.ModuleContext, subdir string, srcFiles and
|
|||
})
|
||||
continue
|
||||
case ".rc":
|
||||
ctx.ModuleBuild(pctx, android.ModuleBuildParams{
|
||||
ctx.Build(pctx, android.BuildParams{
|
||||
Rule: windres,
|
||||
Description: "windres " + srcFile.Rel(),
|
||||
Output: objFile,
|
||||
|
@ -420,7 +420,7 @@ func TransformSourceToObj(ctx android.ModuleContext, subdir string, srcFiles and
|
|||
coverageFiles = append(coverageFiles, gcnoFile)
|
||||
}
|
||||
|
||||
ctx.ModuleBuild(pctx, android.ModuleBuildParams{
|
||||
ctx.Build(pctx, android.BuildParams{
|
||||
Rule: cc,
|
||||
Description: ccDesc + " " + srcFile.Rel(),
|
||||
Output: objFile,
|
||||
|
@ -437,7 +437,7 @@ func TransformSourceToObj(ctx android.ModuleContext, subdir string, srcFiles and
|
|||
tidyFile := android.ObjPathWithExt(ctx, subdir, srcFile, "tidy")
|
||||
tidyFiles = append(tidyFiles, tidyFile)
|
||||
|
||||
ctx.ModuleBuild(pctx, android.ModuleBuildParams{
|
||||
ctx.Build(pctx, android.BuildParams{
|
||||
Rule: clangTidy,
|
||||
Description: "clang-tidy " + srcFile.Rel(),
|
||||
Output: tidyFile,
|
||||
|
@ -456,7 +456,7 @@ func TransformSourceToObj(ctx android.ModuleContext, subdir string, srcFiles and
|
|||
sAbiDumpFile := android.ObjPathWithExt(ctx, subdir, srcFile, "sdump")
|
||||
sAbiDumpFiles = append(sAbiDumpFiles, sAbiDumpFile)
|
||||
|
||||
ctx.ModuleBuild(pctx, android.ModuleBuildParams{
|
||||
ctx.Build(pctx, android.BuildParams{
|
||||
Rule: sAbiDump,
|
||||
Description: "header-abi-dumper " + srcFile.Rel(),
|
||||
Output: sAbiDumpFile,
|
||||
|
@ -494,7 +494,7 @@ func TransformObjToStaticLib(ctx android.ModuleContext, objFiles android.Paths,
|
|||
arFlags += " " + flags.arFlags
|
||||
}
|
||||
|
||||
ctx.ModuleBuild(pctx, android.ModuleBuildParams{
|
||||
ctx.Build(pctx, android.BuildParams{
|
||||
Rule: ar,
|
||||
Description: "static link " + outputFile.Base(),
|
||||
Output: outputFile,
|
||||
|
@ -520,14 +520,14 @@ func transformDarwinObjToStaticLib(ctx android.ModuleContext, objFiles android.P
|
|||
dummy := android.PathForModuleOut(ctx, "dummy"+objectExtension)
|
||||
dummyAr := android.PathForModuleOut(ctx, "dummy"+staticLibraryExtension)
|
||||
|
||||
ctx.ModuleBuild(pctx, android.ModuleBuildParams{
|
||||
ctx.Build(pctx, android.BuildParams{
|
||||
Rule: emptyFile,
|
||||
Description: "empty object file",
|
||||
Output: dummy,
|
||||
Implicits: deps,
|
||||
})
|
||||
|
||||
ctx.ModuleBuild(pctx, android.ModuleBuildParams{
|
||||
ctx.Build(pctx, android.BuildParams{
|
||||
Rule: darwinAr,
|
||||
Description: "empty static archive",
|
||||
Output: dummyAr,
|
||||
|
@ -537,7 +537,7 @@ func transformDarwinObjToStaticLib(ctx android.ModuleContext, objFiles android.P
|
|||
},
|
||||
})
|
||||
|
||||
ctx.ModuleBuild(pctx, android.ModuleBuildParams{
|
||||
ctx.Build(pctx, android.BuildParams{
|
||||
Rule: darwinAppendAr,
|
||||
Description: "static link " + outputFile.Base(),
|
||||
Output: outputFile,
|
||||
|
@ -565,7 +565,7 @@ func transformDarwinObjToStaticLib(ctx android.ModuleContext, objFiles android.P
|
|||
out = android.PathForModuleOut(ctx, outputFile.Base()+strconv.Itoa(i))
|
||||
}
|
||||
|
||||
build := android.ModuleBuildParams{
|
||||
build := android.BuildParams{
|
||||
Rule: darwinAr,
|
||||
Description: "static link " + out.Base(),
|
||||
Output: out,
|
||||
|
@ -579,7 +579,7 @@ func transformDarwinObjToStaticLib(ctx android.ModuleContext, objFiles android.P
|
|||
build.Rule = darwinAppendAr
|
||||
build.Args["inAr"] = in.String()
|
||||
}
|
||||
ctx.ModuleBuild(pctx, build)
|
||||
ctx.Build(pctx, build)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -639,7 +639,7 @@ func TransformObjToDynamicBinary(ctx android.ModuleContext,
|
|||
deps = append(deps, crtBegin.Path(), crtEnd.Path())
|
||||
}
|
||||
|
||||
ctx.ModuleBuild(pctx, android.ModuleBuildParams{
|
||||
ctx.Build(pctx, android.BuildParams{
|
||||
Rule: ld,
|
||||
Description: "link " + outputFile.Base(),
|
||||
Output: outputFile,
|
||||
|
@ -669,7 +669,7 @@ func TransformDumpToLinkedDump(ctx android.ModuleContext, sAbiDumps android.Path
|
|||
linkedDumpDep = soFile
|
||||
symbolFilterStr = "-so " + soFile.String()
|
||||
}
|
||||
ctx.ModuleBuild(pctx, android.ModuleBuildParams{
|
||||
ctx.Build(pctx, android.BuildParams{
|
||||
Rule: sAbiLink,
|
||||
Description: "header-abi-linker " + outputFile.Base(),
|
||||
Output: outputFile,
|
||||
|
@ -687,7 +687,7 @@ func TransformDumpToLinkedDump(ctx android.ModuleContext, sAbiDumps android.Path
|
|||
|
||||
func UnzipRefDump(ctx android.ModuleContext, zippedRefDump android.Path, baseName string) android.Path {
|
||||
outputFile := android.PathForModuleOut(ctx, baseName+"_ref.lsdump")
|
||||
ctx.ModuleBuild(pctx, android.ModuleBuildParams{
|
||||
ctx.Build(pctx, android.BuildParams{
|
||||
Rule: unzipRefSAbiDump,
|
||||
Description: "gunzip" + outputFile.Base(),
|
||||
Output: outputFile,
|
||||
|
@ -699,7 +699,7 @@ func UnzipRefDump(ctx android.ModuleContext, zippedRefDump android.Path, baseNam
|
|||
func SourceAbiDiff(ctx android.ModuleContext, inputDump android.Path, referenceDump android.Path,
|
||||
baseName string) android.OptionalPath {
|
||||
outputFile := android.PathForModuleOut(ctx, baseName+".abidiff")
|
||||
ctx.ModuleBuild(pctx, android.ModuleBuildParams{
|
||||
ctx.Build(pctx, android.BuildParams{
|
||||
Rule: sAbiDiff,
|
||||
Description: "header-abi-diff " + outputFile.Base(),
|
||||
Output: outputFile,
|
||||
|
@ -720,7 +720,7 @@ func TransformSharedObjectToToc(ctx android.ModuleContext, inputFile android.Pat
|
|||
|
||||
crossCompile := gccCmd(flags.toolchain, "")
|
||||
|
||||
ctx.ModuleBuild(pctx, android.ModuleBuildParams{
|
||||
ctx.Build(pctx, android.BuildParams{
|
||||
Rule: toc,
|
||||
Description: "generate toc " + inputFile.Base(),
|
||||
Output: outputFile,
|
||||
|
@ -742,7 +742,7 @@ func TransformObjsToObj(ctx android.ModuleContext, objFiles android.Paths,
|
|||
ldCmd = gccCmd(flags.toolchain, "g++")
|
||||
}
|
||||
|
||||
ctx.ModuleBuild(pctx, android.ModuleBuildParams{
|
||||
ctx.Build(pctx, android.BuildParams{
|
||||
Rule: partialLd,
|
||||
Description: "link " + outputFile.Base(),
|
||||
Output: outputFile,
|
||||
|
@ -760,7 +760,7 @@ func TransformBinaryPrefixSymbols(ctx android.ModuleContext, prefix string, inpu
|
|||
|
||||
objcopyCmd := gccCmd(flags.toolchain, "objcopy")
|
||||
|
||||
ctx.ModuleBuild(pctx, android.ModuleBuildParams{
|
||||
ctx.Build(pctx, android.BuildParams{
|
||||
Rule: prefixSymbols,
|
||||
Description: "prefix symbols " + outputFile.Base(),
|
||||
Output: outputFile,
|
||||
|
@ -787,7 +787,7 @@ func TransformStrip(ctx android.ModuleContext, inputFile android.Path,
|
|||
args += " --keep-symbols"
|
||||
}
|
||||
|
||||
ctx.ModuleBuild(pctx, android.ModuleBuildParams{
|
||||
ctx.Build(pctx, android.BuildParams{
|
||||
Rule: strip,
|
||||
Description: "strip " + outputFile.Base(),
|
||||
Output: outputFile,
|
||||
|
@ -802,7 +802,7 @@ func TransformStrip(ctx android.ModuleContext, inputFile android.Path,
|
|||
func TransformDarwinStrip(ctx android.ModuleContext, inputFile android.Path,
|
||||
outputFile android.WritablePath) {
|
||||
|
||||
ctx.ModuleBuild(pctx, android.ModuleBuildParams{
|
||||
ctx.Build(pctx, android.BuildParams{
|
||||
Rule: darwinStrip,
|
||||
Description: "strip " + outputFile.Base(),
|
||||
Output: outputFile,
|
||||
|
@ -827,7 +827,7 @@ func TransformCoverageFilesToLib(ctx android.ModuleContext,
|
|||
func CopyGccLib(ctx android.ModuleContext, libName string,
|
||||
flags builderFlags, outputFile android.WritablePath) {
|
||||
|
||||
ctx.ModuleBuild(pctx, android.ModuleBuildParams{
|
||||
ctx.Build(pctx, android.BuildParams{
|
||||
Rule: copyGccLib,
|
||||
Description: "copy gcc library " + libName,
|
||||
Output: outputFile,
|
||||
|
|
|
@ -66,7 +66,7 @@ var (
|
|||
func genYacc(ctx android.ModuleContext, yaccFile android.Path, outFile android.ModuleGenPath, yaccFlags string) (headerFile android.ModuleGenPath) {
|
||||
headerFile = android.GenPathWithExt(ctx, "yacc", yaccFile, "h")
|
||||
|
||||
ctx.ModuleBuild(pctx, android.ModuleBuildParams{
|
||||
ctx.Build(pctx, android.BuildParams{
|
||||
Rule: yacc,
|
||||
Description: "yacc " + yaccFile.Rel(),
|
||||
Output: outFile,
|
||||
|
@ -83,7 +83,7 @@ func genYacc(ctx android.ModuleContext, yaccFile android.Path, outFile android.M
|
|||
|
||||
func genAidl(ctx android.ModuleContext, aidlFile android.Path, outFile android.ModuleGenPath, aidlFlags string) android.Paths {
|
||||
|
||||
ctx.ModuleBuild(pctx, android.ModuleBuildParams{
|
||||
ctx.Build(pctx, android.BuildParams{
|
||||
Rule: aidl,
|
||||
Description: "aidl " + aidlFile.Rel(),
|
||||
Output: outFile,
|
||||
|
@ -99,7 +99,7 @@ func genAidl(ctx android.ModuleContext, aidlFile android.Path, outFile android.M
|
|||
}
|
||||
|
||||
func genLex(ctx android.ModuleContext, lexFile android.Path, outFile android.ModuleGenPath) {
|
||||
ctx.ModuleBuild(pctx, android.ModuleBuildParams{
|
||||
ctx.Build(pctx, android.BuildParams{
|
||||
Rule: lex,
|
||||
Description: "lex " + lexFile.Rel(),
|
||||
Output: outFile,
|
||||
|
@ -113,7 +113,7 @@ func genWinMsg(ctx android.ModuleContext, srcFile android.Path, flags builderFla
|
|||
|
||||
windmcCmd := gccCmd(flags.toolchain, "windmc")
|
||||
|
||||
ctx.ModuleBuild(pctx, android.ModuleBuildParams{
|
||||
ctx.Build(pctx, android.BuildParams{
|
||||
Rule: windmc,
|
||||
Description: "windmc " + srcFile.Rel(),
|
||||
Output: rcFile,
|
||||
|
|
|
@ -237,7 +237,7 @@ func processHeadersWithVersioner(ctx android.ModuleContext, srcDir, outDir andro
|
|||
}
|
||||
|
||||
timestampFile := android.PathForModuleOut(ctx, "versioner.timestamp")
|
||||
ctx.ModuleBuild(pctx, android.ModuleBuildParams{
|
||||
ctx.Build(pctx, android.BuildParams{
|
||||
Rule: preprocessBionicHeaders,
|
||||
Description: "versioner preprocess " + srcDir.Rel(),
|
||||
Output: timestampFile,
|
||||
|
|
|
@ -270,7 +270,7 @@ func compileStubLibrary(ctx ModuleContext, flags Flags, symbolFile, apiLevel, vn
|
|||
versionScriptPath := android.PathForModuleGen(ctx, "stub.map")
|
||||
symbolFilePath := android.PathForModuleSrc(ctx, symbolFile)
|
||||
apiLevelsJson := android.GetApiLevelsJson(ctx)
|
||||
ctx.ModuleBuild(pctx, android.ModuleBuildParams{
|
||||
ctx.Build(pctx, android.BuildParams{
|
||||
Rule: genStubSrc,
|
||||
Description: "generate stubs " + symbolFilePath.Rel(),
|
||||
Outputs: []android.WritablePath{stubSrcPath, versionScriptPath},
|
||||
|
|
|
@ -124,7 +124,7 @@ func (p *prebuiltBinaryLinker) link(ctx ModuleContext,
|
|||
fileName := p.getStem(ctx) + flags.Toolchain.ExecutableSuffix()
|
||||
outputFile := android.PathForModuleOut(ctx, fileName)
|
||||
|
||||
ctx.ModuleBuild(pctx, android.ModuleBuildParams{
|
||||
ctx.Build(pctx, android.BuildParams{
|
||||
Rule: android.CpExecutable,
|
||||
Description: "prebuilt",
|
||||
Output: outputFile,
|
||||
|
|
|
@ -41,7 +41,7 @@ func genProto(ctx android.ModuleContext, protoFile android.Path,
|
|||
ccFile = android.GenPathWithExt(ctx, "proto", protoFile, "pb.cc")
|
||||
headerFile = android.GenPathWithExt(ctx, "proto", protoFile, "pb.h")
|
||||
|
||||
ctx.ModuleBuild(pctx, android.ModuleBuildParams{
|
||||
ctx.Build(pctx, android.BuildParams{
|
||||
Rule: proto,
|
||||
Description: "protoc " + protoFile.Rel(),
|
||||
Outputs: android.WritablePaths{ccFile, headerFile},
|
||||
|
|
|
@ -75,7 +75,7 @@ func (p *relocationPacker) needsPacking(ctx ModuleContext) bool {
|
|||
}
|
||||
|
||||
func (p *relocationPacker) pack(ctx ModuleContext, in, out android.ModuleOutPath, flags builderFlags) {
|
||||
ctx.ModuleBuild(pctx, android.ModuleBuildParams{
|
||||
ctx.Build(pctx, android.BuildParams{
|
||||
Rule: relocationPackerRule,
|
||||
Description: "pack relocations",
|
||||
Output: out,
|
||||
|
|
2
cc/rs.go
2
cc/rs.go
|
@ -64,7 +64,7 @@ func rsGenerateCpp(ctx android.ModuleContext, rsFiles android.Paths, rsFlags str
|
|||
cppFiles[i] = rsGeneratedCppFile(ctx, rsFile)
|
||||
}
|
||||
|
||||
ctx.ModuleBuild(pctx, android.ModuleBuildParams{
|
||||
ctx.Build(pctx, android.BuildParams{
|
||||
Rule: rsCpp,
|
||||
Description: "llvm-rs-cc",
|
||||
Output: stampFile,
|
||||
|
|
|
@ -289,7 +289,7 @@ func (g *Module) generateSourceFile(ctx android.ModuleContext, task generateTask
|
|||
desc += " " + task.out[0].Base()
|
||||
}
|
||||
|
||||
params := android.ModuleBuildParams{
|
||||
params := android.BuildParams{
|
||||
Rule: g.rule,
|
||||
Description: "generate",
|
||||
Output: task.out[0],
|
||||
|
@ -304,7 +304,7 @@ func (g *Module) generateSourceFile(ctx android.ModuleContext, task generateTask
|
|||
depfile := android.GenPathWithExt(ctx, "", task.out[0], task.out[0].Ext()+".d")
|
||||
params.Depfile = depfile
|
||||
}
|
||||
ctx.ModuleBuild(pctx, params)
|
||||
ctx.Build(pctx, params)
|
||||
|
||||
for _, outputFile := range task.out {
|
||||
g.outputFiles = append(g.outputFiles, outputFile)
|
||||
|
|
|
@ -82,7 +82,7 @@ func CreateResourceJavaFiles(ctx android.ModuleContext, flags []string,
|
|||
publicResourcesFile := android.PathForModuleOut(ctx, "public_resources.xml")
|
||||
proguardOptionsFile := android.PathForModuleOut(ctx, "proguard.options")
|
||||
|
||||
ctx.ModuleBuild(pctx, android.ModuleBuildParams{
|
||||
ctx.Build(pctx, android.BuildParams{
|
||||
Rule: aaptCreateResourceJavaFile,
|
||||
Description: "aapt create R.java",
|
||||
Outputs: android.WritablePaths{publicResourcesFile, proguardOptionsFile, javaFileList},
|
||||
|
@ -102,7 +102,7 @@ func CreateResourceJavaFiles(ctx android.ModuleContext, flags []string,
|
|||
func CreateExportPackage(ctx android.ModuleContext, flags []string, deps android.Paths) android.ModuleOutPath {
|
||||
outputFile := android.PathForModuleOut(ctx, "package-export.apk")
|
||||
|
||||
ctx.ModuleBuild(pctx, android.ModuleBuildParams{
|
||||
ctx.Build(pctx, android.BuildParams{
|
||||
Rule: aaptCreateAssetsPackage,
|
||||
Description: "aapt export package",
|
||||
Output: outputFile,
|
||||
|
@ -120,7 +120,7 @@ func CreateAppPackage(ctx android.ModuleContext, flags []string, jarFile android
|
|||
|
||||
resourceApk := android.PathForModuleOut(ctx, "resources.apk")
|
||||
|
||||
ctx.ModuleBuild(pctx, android.ModuleBuildParams{
|
||||
ctx.Build(pctx, android.BuildParams{
|
||||
Rule: aaptAddResources,
|
||||
Description: "aapt package",
|
||||
Output: resourceApk,
|
||||
|
@ -137,7 +137,7 @@ func CreateAppPackage(ctx android.ModuleContext, flags []string, jarFile android
|
|||
certificateArgs = append(certificateArgs, c+".x509.pem", c+".pk8")
|
||||
}
|
||||
|
||||
ctx.ModuleBuild(pctx, android.ModuleBuildParams{
|
||||
ctx.Build(pctx, android.BuildParams{
|
||||
Rule: signapk,
|
||||
Description: "signapk",
|
||||
Output: outputFile,
|
||||
|
|
|
@ -181,7 +181,7 @@ func TransformKotlinToClasses(ctx android.ModuleContext, outputFile android.Writ
|
|||
inputs := append(android.Paths(nil), srcFiles...)
|
||||
inputs = append(inputs, srcJars...)
|
||||
|
||||
ctx.ModuleBuild(pctx, android.ModuleBuildParams{
|
||||
ctx.Build(pctx, android.BuildParams{
|
||||
Rule: kotlinc,
|
||||
Description: "kotlinc",
|
||||
Output: outputFile,
|
||||
|
@ -236,7 +236,7 @@ func TransformJavaToHeaderClasses(ctx android.ModuleContext, outputFile android.
|
|||
} else {
|
||||
sourcepath = ""
|
||||
}
|
||||
ctx.ModuleBuild(pctx, android.ModuleBuildParams{
|
||||
ctx.Build(pctx, android.BuildParams{
|
||||
Rule: turbine,
|
||||
Description: "turbine",
|
||||
Output: outputFile,
|
||||
|
@ -286,7 +286,7 @@ func transformJavaToClasses(ctx android.ModuleContext, outputFile android.Writab
|
|||
|
||||
deps = append(deps, flags.classpath...)
|
||||
|
||||
ctx.ModuleBuild(pctx, android.ModuleBuildParams{
|
||||
ctx.Build(pctx, android.BuildParams{
|
||||
Rule: rule,
|
||||
Description: desc,
|
||||
Output: outputFile,
|
||||
|
@ -309,7 +309,7 @@ func transformJavaToClasses(ctx android.ModuleContext, outputFile android.Writab
|
|||
func TransformResourcesToJar(ctx android.ModuleContext, outputFile android.WritablePath,
|
||||
jarArgs []string, deps android.Paths) {
|
||||
|
||||
ctx.ModuleBuild(pctx, android.ModuleBuildParams{
|
||||
ctx.Build(pctx, android.BuildParams{
|
||||
Rule: jar,
|
||||
Description: "jar",
|
||||
Output: outputFile,
|
||||
|
@ -341,7 +341,7 @@ func TransformJarsToJar(ctx android.ModuleContext, outputFile android.WritablePa
|
|||
jarArgs = append(jarArgs, "-D")
|
||||
}
|
||||
|
||||
ctx.ModuleBuild(pctx, android.ModuleBuildParams{
|
||||
ctx.Build(pctx, android.BuildParams{
|
||||
Rule: combineJar,
|
||||
Description: desc,
|
||||
Output: outputFile,
|
||||
|
@ -371,7 +371,7 @@ func TransformDesugar(ctx android.ModuleContext, outputFile android.WritablePath
|
|||
deps = append(deps, flags.bootClasspath...)
|
||||
deps = append(deps, flags.classpath...)
|
||||
|
||||
ctx.ModuleBuild(pctx, android.ModuleBuildParams{
|
||||
ctx.Build(pctx, android.BuildParams{
|
||||
Rule: desugar,
|
||||
Description: "desugar",
|
||||
Output: outputFile,
|
||||
|
@ -393,7 +393,7 @@ func TransformClassesJarToDexJar(ctx android.ModuleContext, outputFile android.W
|
|||
|
||||
outDir := android.PathForModuleOut(ctx, "dex")
|
||||
|
||||
ctx.ModuleBuild(pctx, android.ModuleBuildParams{
|
||||
ctx.Build(pctx, android.BuildParams{
|
||||
Rule: dx,
|
||||
Description: "dx",
|
||||
Output: outputFile,
|
||||
|
@ -407,7 +407,7 @@ func TransformClassesJarToDexJar(ctx android.ModuleContext, outputFile android.W
|
|||
|
||||
func TransformJarJar(ctx android.ModuleContext, outputFile android.WritablePath,
|
||||
classesJar android.Path, rulesFile android.Path) {
|
||||
ctx.ModuleBuild(pctx, android.ModuleBuildParams{
|
||||
ctx.Build(pctx, android.BuildParams{
|
||||
Rule: jarjar,
|
||||
Description: "jarjar",
|
||||
Output: outputFile,
|
||||
|
|
|
@ -57,7 +57,7 @@ func genAidl(ctx android.ModuleContext, aidlFile android.Path, aidlFlags string)
|
|||
javaFile := android.GenPathWithExt(ctx, "aidl", aidlFile, "java")
|
||||
depFile := javaFile.String() + ".d"
|
||||
|
||||
ctx.ModuleBuild(pctx, android.ModuleBuildParams{
|
||||
ctx.Build(pctx, android.BuildParams{
|
||||
Rule: aidl,
|
||||
Description: "aidl " + aidlFile.Rel(),
|
||||
Output: javaFile,
|
||||
|
@ -74,7 +74,7 @@ func genAidl(ctx android.ModuleContext, aidlFile android.Path, aidlFlags string)
|
|||
func genLogtags(ctx android.ModuleContext, logtagsFile android.Path) android.Path {
|
||||
javaFile := android.GenPathWithExt(ctx, "logtags", logtagsFile, "java")
|
||||
|
||||
ctx.ModuleBuild(pctx, android.ModuleBuildParams{
|
||||
ctx.Build(pctx, android.BuildParams{
|
||||
Rule: logtags,
|
||||
Description: "logtags " + logtagsFile.Rel(),
|
||||
Output: javaFile,
|
||||
|
|
|
@ -41,7 +41,7 @@ var (
|
|||
func genProto(ctx android.ModuleContext, outputSrcJar android.WritablePath,
|
||||
protoFiles android.Paths, protoFlags string, protoOut, protoOutFlags string) {
|
||||
|
||||
ctx.ModuleBuild(pctx, android.ModuleBuildParams{
|
||||
ctx.Build(pctx, android.BuildParams{
|
||||
Rule: proto,
|
||||
Description: "protoc " + protoFiles[0].Rel(),
|
||||
Output: outputSrcJar,
|
||||
|
|
|
@ -67,7 +67,7 @@ func TransformJarsToSystemModules(ctx android.ModuleContext, moduleName string,
|
|||
android.PathForModuleOut(ctx, "system/release"),
|
||||
}
|
||||
|
||||
ctx.ModuleBuild(pctx, android.ModuleBuildParams{
|
||||
ctx.Build(pctx, android.BuildParams{
|
||||
Rule: jarsTosystemModules,
|
||||
Description: "system modules",
|
||||
Outputs: outputs,
|
||||
|
|
|
@ -87,7 +87,7 @@ func registerBuildActionForModuleFileList(ctx android.ModuleContext,
|
|||
content = append(content, file.String())
|
||||
}
|
||||
|
||||
ctx.ModuleBuild(pctx, android.ModuleBuildParams{
|
||||
ctx.Build(pctx, android.BuildParams{
|
||||
Rule: android.WriteFile,
|
||||
Description: "generate " + fileList.Rel(),
|
||||
Output: fileList,
|
||||
|
@ -140,7 +140,7 @@ func registerBuildActionForParFile(ctx android.ModuleContext, embedded_launcher
|
|||
// added stub file to the soong_zip args.
|
||||
parArgs = append(parArgs, `-P "" `+`-C `+strings.TrimSuffix(stub, mainFileName)+` -f `+stub)
|
||||
|
||||
ctx.ModuleBuild(pctx, android.ModuleBuildParams{
|
||||
ctx.Build(pctx, android.BuildParams{
|
||||
Rule: host_par,
|
||||
Description: "host python archive",
|
||||
Output: binFile,
|
||||
|
@ -169,7 +169,7 @@ func registerBuildActionForParFile(ctx android.ModuleContext, embedded_launcher
|
|||
parArgs = append(parArgs, `-P "" `+`-C `+fmt.Sprintf(
|
||||
"%q", strings.TrimSuffix(entryPoint, entryPointFile))+` -f `+entryPoint)
|
||||
|
||||
ctx.ModuleBuild(pctx, android.ModuleBuildParams{
|
||||
ctx.Build(pctx, android.BuildParams{
|
||||
Rule: embedded_par,
|
||||
Description: "embedded python archive",
|
||||
Output: binFile,
|
||||
|
|
Loading…
Reference in a new issue