diff --git a/android/module.go b/android/module.go index 230d95cab..5894ee7e4 100644 --- a/android/module.go +++ b/android/module.go @@ -34,16 +34,18 @@ var ( ) type ModuleBuildParams struct { - Rule blueprint.Rule - Output WritablePath - Outputs WritablePaths - Input Path - Inputs Paths - Implicit Path - Implicits Paths - OrderOnly Paths - Default bool - Args map[string]string + Rule blueprint.Rule + Output WritablePath + Outputs WritablePaths + ImplicitOutput WritablePath + ImplicitOutputs WritablePaths + Input Path + Inputs Paths + Implicit Path + Implicits Paths + OrderOnly Paths + Default bool + Args map[string]string } type androidBaseContext interface { @@ -519,18 +521,22 @@ func (a *androidModuleContext) Build(pctx blueprint.PackageContext, params bluep func (a *androidModuleContext) ModuleBuild(pctx blueprint.PackageContext, params ModuleBuildParams) { bparams := blueprint.BuildParams{ - Rule: params.Rule, - Outputs: params.Outputs.Strings(), - Inputs: params.Inputs.Strings(), - Implicits: params.Implicits.Strings(), - OrderOnly: params.OrderOnly.Strings(), - Args: params.Args, - Optional: !params.Default, + Rule: params.Rule, + Outputs: params.Outputs.Strings(), + ImplicitOutputs: params.ImplicitOutputs.Strings(), + Inputs: params.Inputs.Strings(), + Implicits: params.Implicits.Strings(), + OrderOnly: params.OrderOnly.Strings(), + Args: params.Args, + Optional: !params.Default, } if params.Output != nil { bparams.Outputs = append(bparams.Outputs, params.Output.String()) } + if params.ImplicitOutput != nil { + bparams.ImplicitOutputs = append(bparams.ImplicitOutputs, params.ImplicitOutput.String()) + } if params.Input != nil { bparams.Inputs = append(bparams.Inputs, params.Input.String()) } diff --git a/cc/gen.go b/cc/gen.go index 9d3a67cf6..1000bf814 100644 --- a/cc/gen.go +++ b/cc/gen.go @@ -33,11 +33,11 @@ func init() { var ( yacc = pctx.AndroidStaticRule("yacc", blueprint.RuleParams{ - Command: "BISON_PKGDATADIR=$yaccDataDir $yaccCmd -d $yaccFlags --defines=$hFile -o $cFile $in", + Command: "BISON_PKGDATADIR=$yaccDataDir $yaccCmd -d $yaccFlags --defines=$hFile -o $out $in", CommandDeps: []string{"$yaccCmd"}, Description: "yacc $out", }, - "yaccFlags", "cFile", "hFile") + "yaccFlags", "hFile") lex = pctx.AndroidStaticRule("lex", blueprint.RuleParams{ @@ -51,12 +51,12 @@ func genYacc(ctx android.ModuleContext, yaccFile android.Path, outFile android.M headerFile = android.GenPathWithExt(ctx, "yacc", yaccFile, "h") ctx.ModuleBuild(pctx, android.ModuleBuildParams{ - Rule: yacc, - Outputs: android.WritablePaths{outFile, headerFile}, - Input: yaccFile, + Rule: yacc, + Output: outFile, + ImplicitOutput: headerFile, + Input: yaccFile, Args: map[string]string{ "yaccFlags": yaccFlags, - "cFile": outFile.String(), "hFile": headerFile.String(), }, })