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.
Properties
When true, prepend iQuotePaths as -iquote directories in every LLVM compile command produced by stigAnalysisP5SelectAnalyzerInputCompileCommands.
Directories to add as -iquote include paths when enabled is true. Each entry must be an absolute path to a directory.
Source files containing stub definitions to compile alongside the element's source files, providing symbol definitions for functions outside analysis scope.
Functions
Convenience: add a repo-resolved directory to the iQuotePaths list.
Convenience: add directories to the iQuotePaths list.
Convenience: add resolved repo-file paths to the stubSourceFiles list.
Convenience: add stub source file paths as raw strings.