Lines Matching refs:ctx

71 func getGcovProfileLibraryName(ctx ModuleContextIntf) string {
75 if ctx.useSdk() {
82 func getClangProfileLibraryName(ctx ModuleContextIntf) string {
83 if ctx.useSdk() {
85 } else if ctx.isCfiAssemblySupportEnabled() {
93 func (cov *coverage) deps(ctx DepsContext, deps Deps) Deps {
94 if cov.Properties.NeedCoverageVariant && ctx.Device() {
95 ctx.AddVariationDependencies([]blueprint.Variation{
97 }, CoverageDepTag, getGcovProfileLibraryName(ctx))
98 ctx.AddVariationDependencies([]blueprint.Variation{
100 }, CoverageDepTag, getClangProfileLibraryName(ctx))
105 func EnableContinuousCoverage(ctx android.BaseModuleContext) bool {
106 return ctx.DeviceConfig().ClangCoverageContinuousMode()
109 func (cov *coverage) flags(ctx ModuleContext, flags Flags, deps PathDeps) (Flags, PathDeps) {
110 clangCoverage := ctx.DeviceConfig().ClangCoverageEnabled()
111 gcovCoverage := ctx.DeviceConfig().GcovCoverageEnabled()
133 if EnableContinuousCoverage(ctx) {
139 if c, ok := ctx.Module().(*Module); ok && c.sanitize.isSanitizerEnabled(Hwasan) {
148 if ctx.static() && !ctx.staticBinary() {
152 ctx.VisitDirectDeps(func(m android.Module) {
153 if depTag, ok := ctx.OtherModuleDependencyTag(m).(libraryDependencyTag); ok {
166 ctx.VisitDirectDeps(func(m android.Module) {
187 if ctx.Device() {
188 coverage := ctx.GetDirectDepWithTag(getGcovProfileLibraryName(ctx), CoverageDepTag).(*Module)
194 if EnableContinuousCoverage(ctx) {
198 if ctx.Device() {
199 coverage := ctx.GetDirectDepWithTag(getClangProfileLibraryName(ctx), CoverageDepTag).(*Module)
209 func (cov *coverage) begin(ctx BaseModuleContext) {
210 if ctx.Host() && !ctx.Os().Linux() {
214 …cov.Properties = SetCoverageProperties(ctx, cov.Properties, ctx.nativeCoverage(), ctx.useSdk(), ct…
218 func SetCoverageProperties(ctx android.BaseModuleContext, properties CoverageProperties, moduleType…
221 if !ctx.DeviceConfig().NativeCoverageEnabled() {
240 needCoverageBuild = ctx.DeviceConfig().NativeCoverageEnabledForPath(ctx.ModuleDir())
252 IsNativeCoverageNeeded(ctx android.IncomingTransitionContext) bool
268 func (c coverageTransitionMutator) Split(ctx android.BaseModuleContext) []string {
269 if c, ok := ctx.Module().(*Module); ok && c.coverage != nil {
273 } else if cov, ok := ctx.Module().(Coverage); ok && cov.IsNativeCoverageNeeded(ctx) {
280 } else if cov, ok := ctx.Module().(UseCoverage); ok && cov.IsNativeCoverageNeeded(ctx) {
289 func (c coverageTransitionMutator) OutgoingTransition(ctx android.OutgoingTransitionContext, source…
293 func (c coverageTransitionMutator) IncomingTransition(ctx android.IncomingTransitionContext, incomi…
294 if c, ok := ctx.Module().(*Module); ok && c.coverage != nil {
298 } else if cov, ok := ctx.Module().(Coverage); ok {
299 if !cov.IsNativeCoverageNeeded(ctx) {
302 } else if cov, ok := ctx.Module().(UseCoverage); ok && cov.IsNativeCoverageNeeded(ctx) {
312 func (c coverageTransitionMutator) Mutate(ctx android.BottomUpMutatorContext, variation string) {
313 if c, ok := ctx.Module().(*Module); ok && c.coverage != nil {
327 } else if cov, ok := ctx.Module().(Coverage); ok && cov.IsNativeCoverageNeeded(ctx) {
341 } else if cov, ok := ctx.Module().(UseCoverage); ok && cov.IsNativeCoverageNeeded(ctx) {
347 func parseSymbolFileForAPICoverage(ctx ModuleContext, symbolFile string) android.ModuleOutPath {
348 apiLevelsJson := android.GetApiLevelsJson(ctx)
349 symbolFilePath := android.PathForModuleSrc(ctx, symbolFile)
350 outputFile := ctx.baseModuleName() + ".xml"
351 parsedApiCoveragePath := android.PathForModuleOut(ctx, outputFile)
352 rule := android.NewRuleBuilder(pctx, ctx)