Convert yacc to a single RuleBuilder rule

So that <module>/gen/yacc/... is (re)created by a single rule, previous
files are removed, and location.hh is in the build graph when it is
produced.

Test: treehugger
Change-Id: I2f6e47ea07f315e10ae1cb8ad50697e7123d0285
This commit is contained in:
Dan Willemsen
2019-04-10 22:59:54 -07:00
parent 633c502295
commit 4e0aa23dd3
7 changed files with 78 additions and 34 deletions

View File

@@ -57,9 +57,6 @@ type BaseCompilerProperties struct {
// compiling with clang
Clang_asflags []string `android:"arch_variant"`
// list of module-specific flags that will be used for .y and .yy compiles
Yaccflags []string
// the instruction set architecture to use to compile the C/C++
// module.
Instruction_set *string `android:"arch_variant"`
@@ -103,6 +100,8 @@ type BaseCompilerProperties struct {
// if set to false, use -std=c++* instead of -std=gnu++*
Gnu_extensions *bool
Yacc *YaccProperties
Aidl struct {
// list of directories that will be added to the aidl include paths.
Include_dirs []string
@@ -275,7 +274,8 @@ func (compiler *baseCompiler) compilerFlags(ctx ModuleContext, flags Flags, deps
flags.ConlyFlags = append(flags.ConlyFlags, esc(compiler.Properties.Conlyflags)...)
flags.AsFlags = append(flags.AsFlags, esc(compiler.Properties.Asflags)...)
flags.YasmFlags = append(flags.YasmFlags, esc(compiler.Properties.Asflags)...)
flags.YaccFlags = append(flags.YaccFlags, esc(compiler.Properties.Yaccflags)...)
flags.Yacc = compiler.Properties.Yacc
// Include dir cflags
localIncludeDirs := android.PathsForModuleSrc(ctx, compiler.Properties.Local_include_dirs)