Add support for Implicit Outputs
am: 9f3c574a39
Change-Id: I6958429c73a4c6e656241b75d444506a2832acc1
This commit is contained in:
commit
610c494886
|
@ -37,6 +37,8 @@ type ModuleBuildParams struct {
|
|||
Rule blueprint.Rule
|
||||
Output WritablePath
|
||||
Outputs WritablePaths
|
||||
ImplicitOutput WritablePath
|
||||
ImplicitOutputs WritablePaths
|
||||
Input Path
|
||||
Inputs Paths
|
||||
Implicit Path
|
||||
|
@ -521,6 +523,7 @@ func (a *androidModuleContext) ModuleBuild(pctx blueprint.PackageContext, params
|
|||
bparams := blueprint.BuildParams{
|
||||
Rule: params.Rule,
|
||||
Outputs: params.Outputs.Strings(),
|
||||
ImplicitOutputs: params.ImplicitOutputs.Strings(),
|
||||
Inputs: params.Inputs.Strings(),
|
||||
Implicits: params.Implicits.Strings(),
|
||||
OrderOnly: params.OrderOnly.Strings(),
|
||||
|
@ -531,6 +534,9 @@ func (a *androidModuleContext) ModuleBuild(pctx blueprint.PackageContext, params
|
|||
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())
|
||||
}
|
||||
|
|
|
@ -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{
|
||||
|
@ -52,11 +52,11 @@ func genYacc(ctx android.ModuleContext, yaccFile android.Path, outFile android.M
|
|||
|
||||
ctx.ModuleBuild(pctx, android.ModuleBuildParams{
|
||||
Rule: yacc,
|
||||
Outputs: android.WritablePaths{outFile, headerFile},
|
||||
Output: outFile,
|
||||
ImplicitOutput: headerFile,
|
||||
Input: yaccFile,
|
||||
Args: map[string]string{
|
||||
"yaccFlags": yaccFlags,
|
||||
"cFile": outFile.String(),
|
||||
"hFile": headerFile.String(),
|
||||
},
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue