diff options
Diffstat (limited to 'cc/cc.go')
| -rw-r--r-- | cc/cc.go | 29 |
1 files changed, 21 insertions, 8 deletions
@@ -57,14 +57,14 @@ func RegisterCCBuildComponents(ctx android.RegistrationContext) { }) ctx.PostDepsMutators(func(ctx android.RegisterMutatorsContext) { - ctx.TopDown("asan_deps", sanitizerDepsMutator(asan)) - ctx.BottomUp("asan", sanitizerMutator(asan)).Parallel() + ctx.TopDown("asan_deps", sanitizerDepsMutator(Asan)) + ctx.BottomUp("asan", sanitizerMutator(Asan)).Parallel() ctx.TopDown("hwasan_deps", sanitizerDepsMutator(hwasan)) ctx.BottomUp("hwasan", sanitizerMutator(hwasan)).Parallel() - ctx.TopDown("fuzzer_deps", sanitizerDepsMutator(fuzzer)) - ctx.BottomUp("fuzzer", sanitizerMutator(fuzzer)).Parallel() + ctx.TopDown("fuzzer_deps", sanitizerDepsMutator(Fuzzer)) + ctx.BottomUp("fuzzer", sanitizerMutator(Fuzzer)).Parallel() // cfi mutator shouldn't run before sanitizers that return true for // incompatibleWithCfi() @@ -785,6 +785,14 @@ type Module struct { hideApexVariantFromMake bool } +func (c *Module) SetPreventInstall() { + c.Properties.PreventInstall = true +} + +func (c *Module) SetHideFromMake() { + c.Properties.HideFromMake = true +} + func (c *Module) Toc() android.OptionalPath { if c.linker != nil { if library, ok := c.linker.(libraryInterface); ok { @@ -1026,7 +1034,7 @@ func (c *Module) Init() android.Module { // Returns true for dependency roots (binaries) // TODO(ccross): also handle dlopenable libraries -func (c *Module) isDependencyRoot() bool { +func (c *Module) IsDependencyRoot() bool { if root, ok := c.linker.(interface { isDependencyRoot() bool }); ok { @@ -1264,7 +1272,7 @@ func (ctx *moduleContextImpl) staticBinary() bool { } func (ctx *moduleContextImpl) header() bool { - return ctx.mod.header() + return ctx.mod.Header() } func (ctx *moduleContextImpl) binary() bool { @@ -1421,6 +1429,10 @@ func (c *Module) Prebuilt() *android.Prebuilt { return nil } +func (c *Module) IsPrebuilt() bool { + return c.Prebuilt() != nil +} + func (c *Module) Name() string { name := c.ModuleBase.Name() if p, ok := c.linker.(interface { @@ -2847,7 +2859,7 @@ func (c *Module) makeLibName(ctx android.ModuleContext, ccDep LinkableInterface, return baseName + ".vendor" } - if c.inVendor() && vendorSuffixModules[baseName] { + if c.InVendor() && vendorSuffixModules[baseName] { return baseName + ".vendor" } else if c.InRecovery() && recoverySuffixModules[baseName] { return baseName + ".recovery" @@ -2959,7 +2971,8 @@ func (c *Module) staticBinary() bool { return false } -func (c *Module) header() bool { +// Header returns true if the module is a header-only variant. (See cc/library.go header()). +func (c *Module) Header() bool { if h, ok := c.linker.(interface { header() bool }); ok { |