StubsDsl

open class StubsDsl

DSL block for stub header configuration within analyzerInput { stubs { ... } }.

When enabled, stub include directories are prepended as -iquote paths in every LLVM compile command, allowing stub headers to shadow real ones for quoted includes in symbols that are not part of the analysis scope.

Usage

analyzerInput {
stubs {
enabled = true
iQuotePath(stigProject / "stubs/include")
// Stub source files compiled alongside element source (no-op definitions)
stubSource(
repos["stig-project"] / "stubs/src/analysis_stubs.cpp",
)
}
}

Inheritance

The stubs { } block can also be declared at the group or defaults level. Child levels (group → element) override the parent using replacement semantics: if a child declares any stubs { } configuration, it completely replaces the parent's.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard

When true, prepend iQuotePaths as -iquote directories in every LLVM compile command produced by stigAnalysisP5SelectAnalyzerInputCompileCommands.

Link copied to clipboard

Directories to add as -iquote include paths when enabled is true. Each entry must be an absolute path to a directory.

Link copied to clipboard

Source files containing stub definitions to compile alongside the element's source files, providing symbol definitions for functions outside analysis scope.

Functions

Link copied to clipboard
fun iQuotePath(vararg dirs: StigRepoFile)

Convenience: add a repo-resolved directory to the iQuotePaths list.

fun iQuotePath(vararg paths: String)

Convenience: add directories to the iQuotePaths list.

Link copied to clipboard
fun stubSource(vararg files: StigRepoFile)

Convenience: add resolved repo-file paths to the stubSourceFiles list.

fun stubSource(vararg paths: String)

Convenience: add stub source file paths as raw strings.