Loading aconfig/build_flags/build_flags.go +5 −4 Original line number Diff line number Diff line Loading @@ -35,7 +35,7 @@ func registerBuildFlagsModuleType(ctx android.RegistrationContext) { type buildFlags struct { android.ModuleBase outputPath android.OutputPath outputPath android.Path } func buildFlagsFactory() android.Module { Loading @@ -48,7 +48,7 @@ func (m *buildFlags) GenerateAndroidBuildActions(ctx android.ModuleContext) { // Read the build_flags_<partition>.json file generated by soong // 'release-config' command. srcPath := android.PathForOutput(ctx, "release-config", fmt.Sprintf("build_flags_%s.json", m.PartitionTag(ctx.DeviceConfig()))) m.outputPath = android.PathForModuleOut(ctx, outJsonFileName).OutputPath outputPath := android.PathForModuleOut(ctx, outJsonFileName) // The 'release-config' command is called for every build, and generates the // build_flags_<partition>.json file. Loading @@ -56,11 +56,12 @@ func (m *buildFlags) GenerateAndroidBuildActions(ctx android.ModuleContext) { ctx.Build(pctx, android.BuildParams{ Rule: android.CpIfChanged, Input: srcPath, Output: m.outputPath, Output: outputPath, }) installPath := android.PathForModuleInstall(ctx, "etc") ctx.InstallFile(installPath, outJsonFileName, m.outputPath) ctx.InstallFile(installPath, outJsonFileName, outputPath) m.outputPath = outputPath } func (m *buildFlags) AndroidMkEntries() []android.AndroidMkEntries { Loading android/apex.go +9 −7 Original line number Diff line number Diff line Loading @@ -896,8 +896,8 @@ type ApexModuleDepInfo struct { type DepNameToDepInfoMap map[string]ApexModuleDepInfo type ApexBundleDepsInfo struct { flatListPath OutputPath fullListPath OutputPath flatListPath Path fullListPath Path } type ApexBundleDepsInfoIntf interface { Loading Loading @@ -934,13 +934,15 @@ func (d *ApexBundleDepsInfo) BuildDepsInfoLists(ctx ModuleContext, minSdkVersion fmt.Fprintf(&flatContent, "%s\n", toName) } d.fullListPath = PathForModuleOut(ctx, "depsinfo", "fulllist.txt").OutputPath WriteFileRule(ctx, d.fullListPath, fullContent.String()) fullListPath := PathForModuleOut(ctx, "depsinfo", "fulllist.txt") WriteFileRule(ctx, fullListPath, fullContent.String()) d.fullListPath = fullListPath d.flatListPath = PathForModuleOut(ctx, "depsinfo", "flatlist.txt").OutputPath WriteFileRule(ctx, d.flatListPath, flatContent.String()) flatListPath := PathForModuleOut(ctx, "depsinfo", "flatlist.txt") WriteFileRule(ctx, flatListPath, flatContent.String()) d.flatListPath = flatListPath ctx.Phony(fmt.Sprintf("%s-depsinfo", ctx.ModuleName()), d.fullListPath, d.flatListPath) ctx.Phony(fmt.Sprintf("%s-depsinfo", ctx.ModuleName()), fullListPath, flatListPath) } // Function called while walking an APEX's payload dependencies. Loading android/build_prop.go +8 −7 Original line number Diff line number Diff line Loading @@ -55,7 +55,7 @@ type buildPropModule struct { properties buildPropProperties outputFilePath OutputPath outputFilePath Path installPath InstallPath } Loading Loading @@ -128,7 +128,7 @@ func (p *buildPropModule) GenerateAndroidBuildActions(ctx ModuleContext) { ctx.ModuleErrorf("Android_info cannot be set if build.prop is not installed in vendor partition") } p.outputFilePath = PathForModuleOut(ctx, "build.prop").OutputPath outputFilePath := PathForModuleOut(ctx, "build.prop") partition := p.partition(ctx.DeviceConfig()) Loading Loading @@ -157,7 +157,7 @@ func (p *buildPropModule) GenerateAndroidBuildActions(ctx ModuleContext) { cmd.FlagWithInput("--product-config=", PathForModuleSrc(ctx, proptools.String(p.properties.Product_config))) cmd.FlagWithArg("--partition=", partition) cmd.FlagForEachInput("--prop-files=", p.propFiles(ctx)) cmd.FlagWithOutput("--out=", p.outputFilePath) cmd.FlagWithOutput("--out=", outputFilePath) postProcessCmd := rule.Command().BuiltTool("post_process_props") if ctx.DeviceConfig().BuildBrokenDupSysprop() { Loading @@ -170,17 +170,18 @@ func (p *buildPropModule) GenerateAndroidBuildActions(ctx ModuleContext) { // still need to pass an empty string to kernel-version-file-for-uffd-gc postProcessCmd.FlagWithArg("--kernel-version-file-for-uffd-gc ", `""`) } postProcessCmd.Text(p.outputFilePath.String()) postProcessCmd.Text(outputFilePath.String()) postProcessCmd.Flags(p.properties.Block_list) rule.Command().Text("echo").Text(proptools.NinjaAndShellEscape("# end of file")).FlagWithArg(">> ", p.outputFilePath.String()) rule.Command().Text("echo").Text(proptools.NinjaAndShellEscape("# end of file")).FlagWithArg(">> ", outputFilePath.String()) rule.Build(ctx.ModuleName(), "generating build.prop") p.installPath = PathForModuleInstall(ctx, proptools.String(p.properties.Relative_install_path)) ctx.InstallFile(p.installPath, p.stem(), p.outputFilePath) ctx.InstallFile(p.installPath, p.stem(), outputFilePath) ctx.SetOutputFiles(Paths{p.outputFilePath}, "") ctx.SetOutputFiles(Paths{outputFilePath}, "") p.outputFilePath = outputFilePath } func (p *buildPropModule) AndroidMkEntries() []AndroidMkEntries { Loading android/csuite_config.go +2 −2 Original line number Diff line number Diff line Loading @@ -30,11 +30,11 @@ type csuiteConfigProperties struct { type CSuiteConfig struct { ModuleBase properties csuiteConfigProperties OutputFilePath OutputPath OutputFilePath Path } func (me *CSuiteConfig) GenerateAndroidBuildActions(ctx ModuleContext) { me.OutputFilePath = PathForModuleOut(ctx, me.BaseModuleName()).OutputPath me.OutputFilePath = PathForModuleOut(ctx, me.BaseModuleName()) } func (me *CSuiteConfig) AndroidMkEntries() []AndroidMkEntries { Loading android/product_config.go +1 −1 Original line number Diff line number Diff line Loading @@ -32,7 +32,7 @@ func (p *productConfigModule) GenerateAndroidBuildActions(ctx ModuleContext) { ctx.ModuleErrorf("There can only be one product_config module in build/soong") return } outputFilePath := PathForModuleOut(ctx, p.Name()+".json").OutputPath outputFilePath := PathForModuleOut(ctx, p.Name()+".json") // DeviceProduct can be null so calling ctx.Config().DeviceProduct() may cause null dereference targetProduct := proptools.String(ctx.Config().config.productVariables.DeviceProduct) Loading Loading
aconfig/build_flags/build_flags.go +5 −4 Original line number Diff line number Diff line Loading @@ -35,7 +35,7 @@ func registerBuildFlagsModuleType(ctx android.RegistrationContext) { type buildFlags struct { android.ModuleBase outputPath android.OutputPath outputPath android.Path } func buildFlagsFactory() android.Module { Loading @@ -48,7 +48,7 @@ func (m *buildFlags) GenerateAndroidBuildActions(ctx android.ModuleContext) { // Read the build_flags_<partition>.json file generated by soong // 'release-config' command. srcPath := android.PathForOutput(ctx, "release-config", fmt.Sprintf("build_flags_%s.json", m.PartitionTag(ctx.DeviceConfig()))) m.outputPath = android.PathForModuleOut(ctx, outJsonFileName).OutputPath outputPath := android.PathForModuleOut(ctx, outJsonFileName) // The 'release-config' command is called for every build, and generates the // build_flags_<partition>.json file. Loading @@ -56,11 +56,12 @@ func (m *buildFlags) GenerateAndroidBuildActions(ctx android.ModuleContext) { ctx.Build(pctx, android.BuildParams{ Rule: android.CpIfChanged, Input: srcPath, Output: m.outputPath, Output: outputPath, }) installPath := android.PathForModuleInstall(ctx, "etc") ctx.InstallFile(installPath, outJsonFileName, m.outputPath) ctx.InstallFile(installPath, outJsonFileName, outputPath) m.outputPath = outputPath } func (m *buildFlags) AndroidMkEntries() []android.AndroidMkEntries { Loading
android/apex.go +9 −7 Original line number Diff line number Diff line Loading @@ -896,8 +896,8 @@ type ApexModuleDepInfo struct { type DepNameToDepInfoMap map[string]ApexModuleDepInfo type ApexBundleDepsInfo struct { flatListPath OutputPath fullListPath OutputPath flatListPath Path fullListPath Path } type ApexBundleDepsInfoIntf interface { Loading Loading @@ -934,13 +934,15 @@ func (d *ApexBundleDepsInfo) BuildDepsInfoLists(ctx ModuleContext, minSdkVersion fmt.Fprintf(&flatContent, "%s\n", toName) } d.fullListPath = PathForModuleOut(ctx, "depsinfo", "fulllist.txt").OutputPath WriteFileRule(ctx, d.fullListPath, fullContent.String()) fullListPath := PathForModuleOut(ctx, "depsinfo", "fulllist.txt") WriteFileRule(ctx, fullListPath, fullContent.String()) d.fullListPath = fullListPath d.flatListPath = PathForModuleOut(ctx, "depsinfo", "flatlist.txt").OutputPath WriteFileRule(ctx, d.flatListPath, flatContent.String()) flatListPath := PathForModuleOut(ctx, "depsinfo", "flatlist.txt") WriteFileRule(ctx, flatListPath, flatContent.String()) d.flatListPath = flatListPath ctx.Phony(fmt.Sprintf("%s-depsinfo", ctx.ModuleName()), d.fullListPath, d.flatListPath) ctx.Phony(fmt.Sprintf("%s-depsinfo", ctx.ModuleName()), fullListPath, flatListPath) } // Function called while walking an APEX's payload dependencies. Loading
android/build_prop.go +8 −7 Original line number Diff line number Diff line Loading @@ -55,7 +55,7 @@ type buildPropModule struct { properties buildPropProperties outputFilePath OutputPath outputFilePath Path installPath InstallPath } Loading Loading @@ -128,7 +128,7 @@ func (p *buildPropModule) GenerateAndroidBuildActions(ctx ModuleContext) { ctx.ModuleErrorf("Android_info cannot be set if build.prop is not installed in vendor partition") } p.outputFilePath = PathForModuleOut(ctx, "build.prop").OutputPath outputFilePath := PathForModuleOut(ctx, "build.prop") partition := p.partition(ctx.DeviceConfig()) Loading Loading @@ -157,7 +157,7 @@ func (p *buildPropModule) GenerateAndroidBuildActions(ctx ModuleContext) { cmd.FlagWithInput("--product-config=", PathForModuleSrc(ctx, proptools.String(p.properties.Product_config))) cmd.FlagWithArg("--partition=", partition) cmd.FlagForEachInput("--prop-files=", p.propFiles(ctx)) cmd.FlagWithOutput("--out=", p.outputFilePath) cmd.FlagWithOutput("--out=", outputFilePath) postProcessCmd := rule.Command().BuiltTool("post_process_props") if ctx.DeviceConfig().BuildBrokenDupSysprop() { Loading @@ -170,17 +170,18 @@ func (p *buildPropModule) GenerateAndroidBuildActions(ctx ModuleContext) { // still need to pass an empty string to kernel-version-file-for-uffd-gc postProcessCmd.FlagWithArg("--kernel-version-file-for-uffd-gc ", `""`) } postProcessCmd.Text(p.outputFilePath.String()) postProcessCmd.Text(outputFilePath.String()) postProcessCmd.Flags(p.properties.Block_list) rule.Command().Text("echo").Text(proptools.NinjaAndShellEscape("# end of file")).FlagWithArg(">> ", p.outputFilePath.String()) rule.Command().Text("echo").Text(proptools.NinjaAndShellEscape("# end of file")).FlagWithArg(">> ", outputFilePath.String()) rule.Build(ctx.ModuleName(), "generating build.prop") p.installPath = PathForModuleInstall(ctx, proptools.String(p.properties.Relative_install_path)) ctx.InstallFile(p.installPath, p.stem(), p.outputFilePath) ctx.InstallFile(p.installPath, p.stem(), outputFilePath) ctx.SetOutputFiles(Paths{p.outputFilePath}, "") ctx.SetOutputFiles(Paths{outputFilePath}, "") p.outputFilePath = outputFilePath } func (p *buildPropModule) AndroidMkEntries() []AndroidMkEntries { Loading
android/csuite_config.go +2 −2 Original line number Diff line number Diff line Loading @@ -30,11 +30,11 @@ type csuiteConfigProperties struct { type CSuiteConfig struct { ModuleBase properties csuiteConfigProperties OutputFilePath OutputPath OutputFilePath Path } func (me *CSuiteConfig) GenerateAndroidBuildActions(ctx ModuleContext) { me.OutputFilePath = PathForModuleOut(ctx, me.BaseModuleName()).OutputPath me.OutputFilePath = PathForModuleOut(ctx, me.BaseModuleName()) } func (me *CSuiteConfig) AndroidMkEntries() []AndroidMkEntries { Loading
android/product_config.go +1 −1 Original line number Diff line number Diff line Loading @@ -32,7 +32,7 @@ func (p *productConfigModule) GenerateAndroidBuildActions(ctx ModuleContext) { ctx.ModuleErrorf("There can only be one product_config module in build/soong") return } outputFilePath := PathForModuleOut(ctx, p.Name()+".json").OutputPath outputFilePath := PathForModuleOut(ctx, p.Name()+".json") // DeviceProduct can be null so calling ctx.Config().DeviceProduct() may cause null dereference targetProduct := proptools.String(ctx.Config().config.productVariables.DeviceProduct) Loading