From b4ce0ecad6500edb0ea464ee78b59a04138aed41 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Tue, 13 Sep 2016 13:41:39 -0700 Subject: [PATCH] Remove cc.Customizer Remove cc.Customizer, its functionality has been replaced by android.PropertyCustomizer, and it is not used. Change-Id: Ice32d554015b0800707bc042b187984f73df7979 --- cc/cc.go | 47 ++++++----------------------------------------- 1 file changed, 6 insertions(+), 41 deletions(-) diff --git a/cc/cc.go b/cc/cc.go index 3c517acba..0e34c2fd9 100644 --- a/cc/cc.go +++ b/cc/cc.go @@ -148,18 +148,6 @@ type BaseModuleContext interface { ModuleContextIntf } -type CustomizerFlagsContext interface { - BaseModuleContext - AppendCflags(...string) - AppendLdflags(...string) - AppendAsflags(...string) -} - -type Customizer interface { - Flags(CustomizerFlagsContext) - Properties() []interface{} -} - type feature interface { begin(ctx BaseModuleContext) deps(ctx BaseModuleContext, deps Deps) Deps @@ -235,13 +223,12 @@ type Module struct { multilib android.Multilib // delegates, initialize before calling Init - Customizer Customizer - features []feature - compiler compiler - linker linker - installer installer - stl *stl - sanitize *sanitize + features []feature + compiler compiler + linker linker + installer installer + stl *stl + sanitize *sanitize androidMkSharedLibDeps []string @@ -254,9 +241,6 @@ type Module struct { func (c *Module) Init() (blueprint.Module, []interface{}) { props := []interface{}{&c.Properties, &c.unused} - if c.Customizer != nil { - props = append(props, c.Customizer.Properties()...) - } if c.compiler != nil { props = append(props, c.compiler.compilerProps()...) } @@ -307,21 +291,6 @@ type moduleContextImpl struct { ctx BaseModuleContext } -func (ctx *moduleContextImpl) AppendCflags(flags ...string) { - CheckBadCompilerFlags(ctx.ctx, "", flags) - ctx.mod.compiler.appendCflags(flags) -} - -func (ctx *moduleContextImpl) AppendAsflags(flags ...string) { - CheckBadCompilerFlags(ctx.ctx, "", flags) - ctx.mod.compiler.appendAsflags(flags) -} - -func (ctx *moduleContextImpl) AppendLdflags(flags ...string) { - CheckBadLinkerFlags(ctx.ctx, "", flags) - ctx.mod.linker.appendLdflags(flags) -} - func (ctx *moduleContextImpl) clang() bool { return ctx.mod.clang(ctx.ctx) } @@ -396,10 +365,6 @@ func (c *Module) GenerateAndroidBuildActions(actx android.ModuleContext) { } ctx.ctx = ctx - if c.Customizer != nil { - c.Customizer.Flags(ctx) - } - flags := Flags{ Toolchain: c.toolchain(ctx), Clang: c.clang(ctx),