Merge "se_compat_cil: Prepend generated files with a header"
This commit is contained in:
commit
466964d401
1 changed files with 9 additions and 0 deletions
|
@ -87,6 +87,15 @@ func (c *compatCil) GenerateAndroidBuildActions(ctx android.ModuleContext) {
|
|||
|
||||
srcPaths := c.expandSeSources(ctx)
|
||||
out := android.PathForModuleGen(ctx, c.Name())
|
||||
|
||||
// TODO(b/183362912): Patch secilc to handle empty cil files.
|
||||
// Put a header so that the generated cil mustn't be empty.
|
||||
header := android.PathForModuleGen(ctx, c.Name()+"_header")
|
||||
rule := android.NewRuleBuilder(pctx, ctx)
|
||||
rule.Command().Text("echo").Flag(proptools.ShellEscape(";; " + c.stem())).Text(">").Output(header)
|
||||
rule.Build(c.Name()+"_header", "Generate cil header")
|
||||
srcPaths = append(android.Paths{header}, srcPaths...)
|
||||
|
||||
ctx.Build(pctx, android.BuildParams{
|
||||
Rule: android.Cat,
|
||||
Inputs: srcPaths,
|
||||
|
|
Loading…
Reference in a new issue