Colin Cross | 5049f02 | 2015-03-18 13:28:46 -0700 | [diff] [blame] | 1 | // Copyright 2015 Google Inc. All rights reserved. |
| 2 | // |
| 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | // you may not use this file except in compliance with the License. |
| 5 | // You may obtain a copy of the License at |
| 6 | // |
| 7 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | // |
| 9 | // Unless required by applicable law or agreed to in writing, software |
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | // See the License for the specific language governing permissions and |
| 13 | // limitations under the License. |
| 14 | |
| 15 | package genrule |
| 16 | |
| 17 | import ( |
Colin Cross | 6f080df | 2016-11-04 15:32:58 -0700 | [diff] [blame] | 18 | "fmt" |
| 19 | "strings" |
Dan Willemsen | 3f4539b | 2016-09-28 16:19:10 -0700 | [diff] [blame] | 20 | |
Colin Cross | 70b4059 | 2015-03-23 12:57:34 -0700 | [diff] [blame] | 21 | "github.com/google/blueprint" |
Colin Cross | 5049f02 | 2015-03-18 13:28:46 -0700 | [diff] [blame] | 22 | |
Colin Cross | 635c3b0 | 2016-05-18 15:37:25 -0700 | [diff] [blame] | 23 | "android/soong/android" |
Colin Cross | 5049f02 | 2015-03-18 13:28:46 -0700 | [diff] [blame] | 24 | ) |
| 25 | |
Colin Cross | 463a90e | 2015-06-17 14:20:06 -0700 | [diff] [blame] | 26 | func init() { |
Colin Cross | 798bfce | 2016-10-12 14:28:16 -0700 | [diff] [blame] | 27 | android.RegisterModuleType("gensrcs", GenSrcsFactory) |
| 28 | android.RegisterModuleType("genrule", GenRuleFactory) |
Colin Cross | 463a90e | 2015-06-17 14:20:06 -0700 | [diff] [blame] | 29 | } |
| 30 | |
Colin Cross | 5049f02 | 2015-03-18 13:28:46 -0700 | [diff] [blame] | 31 | var ( |
Colin Cross | 635c3b0 | 2016-05-18 15:37:25 -0700 | [diff] [blame] | 32 | pctx = android.NewPackageContext("android/soong/genrule") |
Colin Cross | 5049f02 | 2015-03-18 13:28:46 -0700 | [diff] [blame] | 33 | ) |
| 34 | |
Colin Cross | 5049f02 | 2015-03-18 13:28:46 -0700 | [diff] [blame] | 35 | type SourceFileGenerator interface { |
Colin Cross | 635c3b0 | 2016-05-18 15:37:25 -0700 | [diff] [blame] | 36 | GeneratedSourceFiles() android.Paths |
Colin Cross | 5ed99c6 | 2016-11-22 12:55:55 -0800 | [diff] [blame] | 37 | GeneratedHeaderDirs() android.Paths |
Colin Cross | 5049f02 | 2015-03-18 13:28:46 -0700 | [diff] [blame] | 38 | } |
| 39 | |
Colin Cross | d350ecd | 2015-04-28 13:25:36 -0700 | [diff] [blame] | 40 | type HostToolProvider interface { |
Colin Cross | 635c3b0 | 2016-05-18 15:37:25 -0700 | [diff] [blame] | 41 | HostToolPath() android.OptionalPath |
Colin Cross | d350ecd | 2015-04-28 13:25:36 -0700 | [diff] [blame] | 42 | } |
Colin Cross | 5049f02 | 2015-03-18 13:28:46 -0700 | [diff] [blame] | 43 | |
Colin Cross | 7d5136f | 2015-05-11 13:39:40 -0700 | [diff] [blame] | 44 | type generatorProperties struct { |
| 45 | // command to run on one or more input files. Available variables for substitution: |
Colin Cross | 6f080df | 2016-11-04 15:32:58 -0700 | [diff] [blame] | 46 | // $(location): the path to the first entry in tools or tool_files |
| 47 | // $(location <label>): the path to the tool or tool_file with name <label> |
| 48 | // $(in): one or more input files |
| 49 | // $(out): a single output file |
Colin Cross | 33bfb0a | 2016-11-21 17:23:08 -0800 | [diff] [blame] | 50 | // $(deps): a file to which dependencies will be written, if the depfile property is set to true |
Colin Cross | 6f080df | 2016-11-04 15:32:58 -0700 | [diff] [blame] | 51 | // $(genDir): the sandbox directory for this tool; contains $(out) |
| 52 | // $$: a literal $ |
| 53 | // |
| 54 | // DO NOT directly reference paths to files in the source tree, or the |
| 55 | // command will be missing proper dependencies to re-run if the files |
| 56 | // change. |
Colin Cross | 7d5136f | 2015-05-11 13:39:40 -0700 | [diff] [blame] | 57 | Cmd string |
| 58 | |
Colin Cross | 33bfb0a | 2016-11-21 17:23:08 -0800 | [diff] [blame] | 59 | // Enable reading a file containing dependencies in gcc format after the command completes |
| 60 | Depfile bool |
| 61 | |
Colin Cross | 6f080df | 2016-11-04 15:32:58 -0700 | [diff] [blame] | 62 | // name of the modules (if any) that produces the host executable. Leave empty for |
Colin Cross | 7d5136f | 2015-05-11 13:39:40 -0700 | [diff] [blame] | 63 | // prebuilts or scripts that do not need a module to build them. |
Colin Cross | 6f080df | 2016-11-04 15:32:58 -0700 | [diff] [blame] | 64 | Tools []string |
Dan Willemsen | f7f3d69 | 2016-04-20 14:54:32 -0700 | [diff] [blame] | 65 | |
| 66 | // Local file that is used as the tool |
Colin Cross | 6f080df | 2016-11-04 15:32:58 -0700 | [diff] [blame] | 67 | Tool_files []string |
Colin Cross | 5ed99c6 | 2016-11-22 12:55:55 -0800 | [diff] [blame] | 68 | |
| 69 | // List of directories to export generated headers from |
| 70 | Export_include_dirs []string |
Colin Cross | 708c424 | 2017-01-13 18:05:49 -0800 | [diff] [blame^] | 71 | |
| 72 | // list of input files |
| 73 | Srcs []string |
Colin Cross | 7d5136f | 2015-05-11 13:39:40 -0700 | [diff] [blame] | 74 | } |
| 75 | |
Colin Cross | d350ecd | 2015-04-28 13:25:36 -0700 | [diff] [blame] | 76 | type generator struct { |
Colin Cross | 635c3b0 | 2016-05-18 15:37:25 -0700 | [diff] [blame] | 77 | android.ModuleBase |
Colin Cross | d350ecd | 2015-04-28 13:25:36 -0700 | [diff] [blame] | 78 | |
Colin Cross | 7d5136f | 2015-05-11 13:39:40 -0700 | [diff] [blame] | 79 | properties generatorProperties |
Colin Cross | d350ecd | 2015-04-28 13:25:36 -0700 | [diff] [blame] | 80 | |
| 81 | tasks taskFunc |
| 82 | |
Colin Cross | 635c3b0 | 2016-05-18 15:37:25 -0700 | [diff] [blame] | 83 | deps android.Paths |
Colin Cross | d350ecd | 2015-04-28 13:25:36 -0700 | [diff] [blame] | 84 | rule blueprint.Rule |
| 85 | |
Colin Cross | 5ed99c6 | 2016-11-22 12:55:55 -0800 | [diff] [blame] | 86 | exportedIncludeDirs android.Paths |
Dan Willemsen | b40aab6 | 2016-04-20 14:21:14 -0700 | [diff] [blame] | 87 | |
Colin Cross | 635c3b0 | 2016-05-18 15:37:25 -0700 | [diff] [blame] | 88 | outputFiles android.Paths |
Colin Cross | d350ecd | 2015-04-28 13:25:36 -0700 | [diff] [blame] | 89 | } |
| 90 | |
Colin Cross | 708c424 | 2017-01-13 18:05:49 -0800 | [diff] [blame^] | 91 | type taskFunc func(ctx android.ModuleContext, srcFiles android.Paths) []generateTask |
Colin Cross | d350ecd | 2015-04-28 13:25:36 -0700 | [diff] [blame] | 92 | |
| 93 | type generateTask struct { |
Colin Cross | 635c3b0 | 2016-05-18 15:37:25 -0700 | [diff] [blame] | 94 | in android.Paths |
Dan Willemsen | 9c8681f | 2016-09-28 16:21:00 -0700 | [diff] [blame] | 95 | out android.WritablePaths |
Colin Cross | d350ecd | 2015-04-28 13:25:36 -0700 | [diff] [blame] | 96 | } |
| 97 | |
Colin Cross | 635c3b0 | 2016-05-18 15:37:25 -0700 | [diff] [blame] | 98 | func (g *generator) GeneratedSourceFiles() android.Paths { |
Colin Cross | d350ecd | 2015-04-28 13:25:36 -0700 | [diff] [blame] | 99 | return g.outputFiles |
| 100 | } |
| 101 | |
Colin Cross | 068e0fe | 2016-12-13 15:23:47 -0800 | [diff] [blame] | 102 | func (g *generator) Srcs() android.Paths { |
| 103 | return g.outputFiles |
| 104 | } |
| 105 | |
Colin Cross | 5ed99c6 | 2016-11-22 12:55:55 -0800 | [diff] [blame] | 106 | func (g *generator) GeneratedHeaderDirs() android.Paths { |
| 107 | return g.exportedIncludeDirs |
Dan Willemsen | b40aab6 | 2016-04-20 14:21:14 -0700 | [diff] [blame] | 108 | } |
| 109 | |
Colin Cross | 1e676be | 2016-10-12 14:38:15 -0700 | [diff] [blame] | 110 | func (g *generator) DepsMutator(ctx android.BottomUpMutatorContext) { |
Colin Cross | 708c424 | 2017-01-13 18:05:49 -0800 | [diff] [blame^] | 111 | android.ExtractSourcesDeps(ctx, g.properties.Srcs) |
Colin Cross | 6362e27 | 2015-10-29 15:25:03 -0700 | [diff] [blame] | 112 | if g, ok := ctx.Module().(*generator); ok { |
Colin Cross | 6f080df | 2016-11-04 15:32:58 -0700 | [diff] [blame] | 113 | if len(g.properties.Tools) > 0 { |
Dan Willemsen | 490fd49 | 2015-11-24 17:53:15 -0800 | [diff] [blame] | 114 | ctx.AddFarVariationDependencies([]blueprint.Variation{ |
Colin Cross | a1ad8d1 | 2016-06-01 17:09:44 -0700 | [diff] [blame] | 115 | {"arch", ctx.AConfig().BuildOsVariant}, |
Colin Cross | 6f080df | 2016-11-04 15:32:58 -0700 | [diff] [blame] | 116 | }, nil, g.properties.Tools...) |
Colin Cross | 6362e27 | 2015-10-29 15:25:03 -0700 | [diff] [blame] | 117 | } |
Colin Cross | d350ecd | 2015-04-28 13:25:36 -0700 | [diff] [blame] | 118 | } |
Colin Cross | d350ecd | 2015-04-28 13:25:36 -0700 | [diff] [blame] | 119 | } |
| 120 | |
Colin Cross | 635c3b0 | 2016-05-18 15:37:25 -0700 | [diff] [blame] | 121 | func (g *generator) GenerateAndroidBuildActions(ctx android.ModuleContext) { |
Colin Cross | 6f080df | 2016-11-04 15:32:58 -0700 | [diff] [blame] | 122 | if len(g.properties.Tools) == 0 && len(g.properties.Tool_files) == 0 { |
| 123 | ctx.ModuleErrorf("at least one `tools` or `tool_files` is required") |
Dan Willemsen | f7f3d69 | 2016-04-20 14:54:32 -0700 | [diff] [blame] | 124 | return |
| 125 | } |
| 126 | |
Colin Cross | 5ed99c6 | 2016-11-22 12:55:55 -0800 | [diff] [blame] | 127 | if len(g.properties.Export_include_dirs) > 0 { |
| 128 | for _, dir := range g.properties.Export_include_dirs { |
| 129 | g.exportedIncludeDirs = append(g.exportedIncludeDirs, |
| 130 | android.PathForModuleGen(ctx, ctx.ModuleDir(), dir)) |
| 131 | } |
| 132 | } else { |
| 133 | g.exportedIncludeDirs = append(g.exportedIncludeDirs, android.PathForModuleGen(ctx, "")) |
| 134 | } |
Dan Willemsen | 3f4539b | 2016-09-28 16:19:10 -0700 | [diff] [blame] | 135 | |
Colin Cross | 6f080df | 2016-11-04 15:32:58 -0700 | [diff] [blame] | 136 | tools := map[string]android.Path{} |
Dan Willemsen | 3f4539b | 2016-09-28 16:19:10 -0700 | [diff] [blame] | 137 | |
Colin Cross | 6f080df | 2016-11-04 15:32:58 -0700 | [diff] [blame] | 138 | if len(g.properties.Tools) > 0 { |
Dan Willemsen | f7f3d69 | 2016-04-20 14:54:32 -0700 | [diff] [blame] | 139 | ctx.VisitDirectDeps(func(module blueprint.Module) { |
| 140 | if t, ok := module.(HostToolProvider); ok { |
| 141 | p := t.HostToolPath() |
| 142 | if p.Valid() { |
| 143 | g.deps = append(g.deps, p.Path()) |
Colin Cross | 6f080df | 2016-11-04 15:32:58 -0700 | [diff] [blame] | 144 | tool := ctx.OtherModuleName(module) |
| 145 | if _, exists := tools[tool]; !exists { |
| 146 | tools[tool] = p.Path() |
| 147 | } else { |
| 148 | ctx.ModuleErrorf("multiple tools for %q, %q and %q", tool, tools[tool], p.Path().String()) |
| 149 | } |
Dan Willemsen | f7f3d69 | 2016-04-20 14:54:32 -0700 | [diff] [blame] | 150 | } else { |
| 151 | ctx.ModuleErrorf("host tool %q missing output file", ctx.OtherModuleName(module)) |
| 152 | } |
Colin Cross | d350ecd | 2015-04-28 13:25:36 -0700 | [diff] [blame] | 153 | } else { |
Dan Willemsen | f7f3d69 | 2016-04-20 14:54:32 -0700 | [diff] [blame] | 154 | ctx.ModuleErrorf("unknown dependency %q", ctx.OtherModuleName(module)) |
Colin Cross | d350ecd | 2015-04-28 13:25:36 -0700 | [diff] [blame] | 155 | } |
Dan Willemsen | f7f3d69 | 2016-04-20 14:54:32 -0700 | [diff] [blame] | 156 | }) |
| 157 | } |
Colin Cross | d350ecd | 2015-04-28 13:25:36 -0700 | [diff] [blame] | 158 | |
Colin Cross | 6f080df | 2016-11-04 15:32:58 -0700 | [diff] [blame] | 159 | for _, tool := range g.properties.Tool_files { |
| 160 | toolPath := android.PathForModuleSrc(ctx, tool) |
| 161 | g.deps = append(g.deps, toolPath) |
| 162 | if _, exists := tools[tool]; !exists { |
| 163 | tools[tool] = toolPath |
| 164 | } else { |
| 165 | ctx.ModuleErrorf("multiple tools for %q, %q and %q", tool, tools[tool], toolPath.String()) |
| 166 | } |
| 167 | } |
| 168 | |
| 169 | cmd, err := android.Expand(g.properties.Cmd, func(name string) (string, error) { |
| 170 | switch name { |
| 171 | case "location": |
| 172 | if len(g.properties.Tools) > 0 { |
| 173 | return tools[g.properties.Tools[0]].String(), nil |
| 174 | } else { |
| 175 | return tools[g.properties.Tool_files[0]].String(), nil |
| 176 | } |
| 177 | case "in": |
| 178 | return "${in}", nil |
| 179 | case "out": |
| 180 | return "${out}", nil |
Colin Cross | 33bfb0a | 2016-11-21 17:23:08 -0800 | [diff] [blame] | 181 | case "depfile": |
| 182 | if !g.properties.Depfile { |
| 183 | return "", fmt.Errorf("$(depfile) used without depfile property") |
| 184 | } |
| 185 | return "${depfile}", nil |
Colin Cross | 6f080df | 2016-11-04 15:32:58 -0700 | [diff] [blame] | 186 | case "genDir": |
Colin Cross | 5ed99c6 | 2016-11-22 12:55:55 -0800 | [diff] [blame] | 187 | return android.PathForModuleGen(ctx, "").String(), nil |
Colin Cross | 6f080df | 2016-11-04 15:32:58 -0700 | [diff] [blame] | 188 | default: |
| 189 | if strings.HasPrefix(name, "location ") { |
| 190 | label := strings.TrimSpace(strings.TrimPrefix(name, "location ")) |
| 191 | if tool, ok := tools[label]; ok { |
| 192 | return tool.String(), nil |
| 193 | } else { |
| 194 | return "", fmt.Errorf("unknown location label %q", label) |
| 195 | } |
| 196 | } |
| 197 | return "", fmt.Errorf("unknown variable '$(%s)'", name) |
| 198 | } |
| 199 | }) |
| 200 | |
| 201 | if err != nil { |
| 202 | ctx.PropertyErrorf("cmd", "%s", err.Error()) |
| 203 | } |
| 204 | |
Colin Cross | 33bfb0a | 2016-11-21 17:23:08 -0800 | [diff] [blame] | 205 | ruleParams := blueprint.RuleParams{ |
Colin Cross | 6f080df | 2016-11-04 15:32:58 -0700 | [diff] [blame] | 206 | Command: cmd, |
Colin Cross | 33bfb0a | 2016-11-21 17:23:08 -0800 | [diff] [blame] | 207 | } |
| 208 | var args []string |
| 209 | if g.properties.Depfile { |
| 210 | ruleParams.Deps = blueprint.DepsGCC |
| 211 | args = append(args, "depfile") |
| 212 | } |
| 213 | g.rule = ctx.Rule(pctx, "generator", ruleParams, args...) |
Colin Cross | 6f080df | 2016-11-04 15:32:58 -0700 | [diff] [blame] | 214 | |
Colin Cross | 708c424 | 2017-01-13 18:05:49 -0800 | [diff] [blame^] | 215 | srcFiles := ctx.ExpandSources(g.properties.Srcs, nil) |
| 216 | for _, task := range g.tasks(ctx, srcFiles) { |
Colin Cross | 6f080df | 2016-11-04 15:32:58 -0700 | [diff] [blame] | 217 | g.generateSourceFile(ctx, task) |
Colin Cross | d350ecd | 2015-04-28 13:25:36 -0700 | [diff] [blame] | 218 | } |
| 219 | } |
| 220 | |
Colin Cross | 6f080df | 2016-11-04 15:32:58 -0700 | [diff] [blame] | 221 | func (g *generator) generateSourceFile(ctx android.ModuleContext, task generateTask) { |
Colin Cross | 33bfb0a | 2016-11-21 17:23:08 -0800 | [diff] [blame] | 222 | params := android.ModuleBuildParams{ |
Colin Cross | d350ecd | 2015-04-28 13:25:36 -0700 | [diff] [blame] | 223 | Rule: g.rule, |
Dan Willemsen | 9c8681f | 2016-09-28 16:21:00 -0700 | [diff] [blame] | 224 | Outputs: task.out, |
Colin Cross | d350ecd | 2015-04-28 13:25:36 -0700 | [diff] [blame] | 225 | Inputs: task.in, |
| 226 | Implicits: g.deps, |
Colin Cross | 33bfb0a | 2016-11-21 17:23:08 -0800 | [diff] [blame] | 227 | } |
| 228 | if g.properties.Depfile { |
| 229 | depfile := android.GenPathWithExt(ctx, "", task.out[0], task.out[0].Ext()+".d") |
| 230 | params.Depfile = depfile |
| 231 | } |
| 232 | ctx.ModuleBuild(pctx, params) |
Colin Cross | d350ecd | 2015-04-28 13:25:36 -0700 | [diff] [blame] | 233 | |
Dan Willemsen | 9c8681f | 2016-09-28 16:21:00 -0700 | [diff] [blame] | 234 | for _, outputFile := range task.out { |
| 235 | g.outputFiles = append(g.outputFiles, outputFile) |
| 236 | } |
Colin Cross | d350ecd | 2015-04-28 13:25:36 -0700 | [diff] [blame] | 237 | } |
| 238 | |
| 239 | func generatorFactory(tasks taskFunc, props ...interface{}) (blueprint.Module, []interface{}) { |
| 240 | module := &generator{ |
| 241 | tasks: tasks, |
| 242 | } |
| 243 | |
| 244 | props = append(props, &module.properties) |
| 245 | |
Colin Cross | 635c3b0 | 2016-05-18 15:37:25 -0700 | [diff] [blame] | 246 | return android.InitAndroidModule(module, props...) |
Colin Cross | d350ecd | 2015-04-28 13:25:36 -0700 | [diff] [blame] | 247 | } |
| 248 | |
| 249 | func GenSrcsFactory() (blueprint.Module, []interface{}) { |
| 250 | properties := &genSrcsProperties{} |
| 251 | |
Colin Cross | 708c424 | 2017-01-13 18:05:49 -0800 | [diff] [blame^] | 252 | tasks := func(ctx android.ModuleContext, srcFiles android.Paths) []generateTask { |
Colin Cross | d350ecd | 2015-04-28 13:25:36 -0700 | [diff] [blame] | 253 | tasks := make([]generateTask, 0, len(srcFiles)) |
| 254 | for _, in := range srcFiles { |
Dan Willemsen | 34cc69e | 2015-09-23 15:26:20 -0700 | [diff] [blame] | 255 | tasks = append(tasks, generateTask{ |
Colin Cross | 635c3b0 | 2016-05-18 15:37:25 -0700 | [diff] [blame] | 256 | in: android.Paths{in}, |
Dan Willemsen | 21ec490 | 2016-11-02 20:43:13 -0700 | [diff] [blame] | 257 | out: android.WritablePaths{android.GenPathWithExt(ctx, "", in, properties.Output_extension)}, |
Dan Willemsen | 34cc69e | 2015-09-23 15:26:20 -0700 | [diff] [blame] | 258 | }) |
Colin Cross | d350ecd | 2015-04-28 13:25:36 -0700 | [diff] [blame] | 259 | } |
| 260 | return tasks |
| 261 | } |
| 262 | |
| 263 | return generatorFactory(tasks, properties) |
| 264 | } |
| 265 | |
| 266 | type genSrcsProperties struct { |
Colin Cross | 7d5136f | 2015-05-11 13:39:40 -0700 | [diff] [blame] | 267 | // extension that will be substituted for each output file |
Colin Cross | 5049f02 | 2015-03-18 13:28:46 -0700 | [diff] [blame] | 268 | Output_extension string |
| 269 | } |
| 270 | |
Colin Cross | d350ecd | 2015-04-28 13:25:36 -0700 | [diff] [blame] | 271 | func GenRuleFactory() (blueprint.Module, []interface{}) { |
| 272 | properties := &genRuleProperties{} |
Colin Cross | 5049f02 | 2015-03-18 13:28:46 -0700 | [diff] [blame] | 273 | |
Colin Cross | 708c424 | 2017-01-13 18:05:49 -0800 | [diff] [blame^] | 274 | tasks := func(ctx android.ModuleContext, srcFiles android.Paths) []generateTask { |
Dan Willemsen | 9c8681f | 2016-09-28 16:21:00 -0700 | [diff] [blame] | 275 | outs := make(android.WritablePaths, len(properties.Out)) |
| 276 | for i, out := range properties.Out { |
| 277 | outs[i] = android.PathForModuleGen(ctx, out) |
| 278 | } |
Colin Cross | d350ecd | 2015-04-28 13:25:36 -0700 | [diff] [blame] | 279 | return []generateTask{ |
| 280 | { |
Colin Cross | 708c424 | 2017-01-13 18:05:49 -0800 | [diff] [blame^] | 281 | in: srcFiles, |
Dan Willemsen | 9c8681f | 2016-09-28 16:21:00 -0700 | [diff] [blame] | 282 | out: outs, |
Colin Cross | d350ecd | 2015-04-28 13:25:36 -0700 | [diff] [blame] | 283 | }, |
| 284 | } |
Colin Cross | 5049f02 | 2015-03-18 13:28:46 -0700 | [diff] [blame] | 285 | } |
Colin Cross | d350ecd | 2015-04-28 13:25:36 -0700 | [diff] [blame] | 286 | |
| 287 | return generatorFactory(tasks, properties) |
Colin Cross | 5049f02 | 2015-03-18 13:28:46 -0700 | [diff] [blame] | 288 | } |
| 289 | |
Colin Cross | d350ecd | 2015-04-28 13:25:36 -0700 | [diff] [blame] | 290 | type genRuleProperties struct { |
Dan Willemsen | 9c8681f | 2016-09-28 16:21:00 -0700 | [diff] [blame] | 291 | // names of the output files that will be generated |
| 292 | Out []string |
Colin Cross | 5049f02 | 2015-03-18 13:28:46 -0700 | [diff] [blame] | 293 | } |