StigBazelExecrootAccessCoordinator

abstract class StigBazelExecrootAccessCoordinator : BuildService<BuildServiceParameters.None>

Build-scoped exclusive-access coordinator for tasks that invoke Bazel or read files through its shared execroot. Despite the BuildService superclass name (a Gradle term, not a runtime daemon), this is one object for the duration of a Gradle build. It serves two roles:

  1. Serializes Bazel-invoking and execroot-dependent tasks across subprojects via maxParallelUsages(1). Subprojects can share the same Bazel execroot, generated outputs, and external/ symlink tree. P1 captures native compiler inputs before releasing this service. Standalone LLVM builders consume these per-activity copies and can overlap Bazel and other LLVM builders. Tasks inspecting the original source tree still use this service.

  2. Caches bazel info execution_root per workspace so consumers don't each re-invoke it.

Tasks that use this coordinator

TaskReason
stigAnalysisP1BuildNativeTargetInvokes bazel build, mutates execroot
stigAnalysisP1ExtractNativeCompileCommandsInvokes bazel aquery, reads execroot
stigGenerateAnalysisHarnessRuns Clang schema inventory over execroot
stigAnalysisP7CollectDescriptionsWalks include paths through execroot
stigAnalysisP7CollectMetricsRuns clang-tidy over execroot inputs

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
@get:Inject
abstract val execOperations: ExecOperations
Link copied to clipboard
@get:Inject
abstract override val parameters: BuildServiceParameters.None?

Functions

Link copied to clipboard
fun execroot(workspaceDir: File, bazelBinary: String, startupOptions: List<String>): String

Returns the Bazel execroot for workspaceDir, invoking bazel info execution_root once per workspace and caching the result.

Link copied to clipboard
@Inject
abstract fun getParameters(): BuildServiceParameters.None?