ada_shared_library

Rules

ada_shared_library

load("@rules_ada//ada:ada_shared_library.bzl", "ada_shared_library")

ada_shared_library(name, deps, srcs, data, compile_data, copts, exports_bodies, lib_name, linkopts,
                   subunits)

Compiles Ada source files into a shared (dynamic) library.

ATTRIBUTES

NameDescriptionTypeMandatoryDefault
nameA unique name for this target.Namerequired
depsDependencies. Can be Ada targets (AdaInfo) or C/C++ targets (CcInfo).List of labelsoptional[]
srcsAda source files (.ads specs and .adb bodies).List of labelsoptional[]
dataAdditional files needed at runtime.List of labelsoptional[]
compile_dataAdditional Ada source files needed during compilation but not compiled independently (e.g., subunit bodies referenced via 'separate').List of labelsoptional[]
coptsAdditional compiler flags for Ada compilation (e.g., -gnatwa, -O2).List of stringsoptional[]
exports_bodiesIf True, this library's body sources flow into downstream compile inputs. Set this on libraries whose public API exposes generics, since cross-unit generic instantiation requires the generic body at the instantiation site's compile time.BooleanoptionalFalse
lib_nameLibrary name for gnatbind -L (unique elaboration namespace). Defaults to the target name.Stringoptional""
linkoptsAdditional linker flags.List of stringsoptional[]
subunitsBody files that are separate subunits, listed explicitly to bypass the hyphen-stem heuristic. Files listed here MUST also appear in srcs. They flow as inputs to their parent unit's compile but get no standalone compile action.List of labelsoptional[]