@@ -131,6 +131,85 @@ To skip the optional example Python packages during the clone-based install, use
131131 example, if you do a regular build you are building for debug, not for release. Thus, be mindful of how
132132 you are building the code.
133133
134+ Inspecting the Build Toolchain
135+ ------------------------------
136+ Every Basilisk build records the C and C++ compilers, build configuration, CMake generator, and versions of the
137+ principal build tools in the installed Python package. This information can be inspected when diagnosing a binary
138+ or build issue.
139+
140+ For a concise, human-readable summary, use ``printBuildInfo() ``::
141+
142+ from Basilisk import printBuildInfo
143+
144+ printBuildInfo()
145+
146+ This produces output similar to::
147+
148+ Basilisk Build Information
149+ Version: 2.12.0 (plugin ABI 1)
150+ Target: macOS arm64, 64-bit
151+ Build: Release, Unix Makefiles
152+ C compiler: AppleClang 21.0.0.21000101 (cc)
153+ C++ compiler: AppleClang 21.0.0.21000101 (c++)
154+ C standard: C17
155+ C++ standard: C++17
156+ C++ ABI: libc++ (210106, ABI 1), Itanium ABI
157+ C++ runtime: system, exceptions, RTTI
158+ Python API: 0x03090000
159+ Eigen: 3.4.0, 16-byte max alignment, NEON
160+ SWIG runtime: 5
161+ Conan profile: Release, C++17, libc++
162+
163+ Build Tools
164+ CMake: 4.2.0
165+ Conan: 2.23.0
166+ SWIG: 4.4.1
167+ Python: 3.14.6
168+
169+ For programmatic inspection or custom formatting, use ``getBuildInfo() ``. It returns a copy of a versioned nested
170+ dictionary with three principal sections::
171+
172+ from Basilisk import getBuildInfo
173+
174+ buildInfo = getBuildInfo()
175+ pluginAbiVersion = buildInfo["artifact"]["pluginAbiVersion"]
176+ standardLibrary = buildInfo["abi"]["cxx"]["standardLibrary"]["family"]
177+ compilerVersion = buildInfo["diagnostics"]["compilers"]["cxx"]["version"]
178+
179+ ``artifact `` identifies the Basilisk version, source revision when available, and plugin ABI epoch. The epoch is
180+ incremented when Basilisk intentionally changes the C/C++ object contract exposed to SDK plugins. It does not
181+ promise compatibility between different Basilisk versions; the SDK's exact-version check remains required unless a
182+ future compatibility policy explicitly relaxes it.
183+
184+ ``abi `` is captured by C and C++ translation units compiled with the selected Basilisk build configuration. It
185+ records the actual target architecture, endianness, C and C++ language modes, compiler ABI, standard-library ABI and
186+ debug modes, runtime linkage, exceptions, RTTI, Python ABI, SWIG runtime epoch, and Eigen alignment and vectorization
187+ settings. It also contains size, alignment, and field-offset canaries for important C, C++, messaging, and Eigen
188+ types. These values are suitable inputs to a future BSK-SDK compatibility policy. Layout canaries detect common
189+ binary mismatches but do not prove semantic compatibility.
190+
191+ The public ``architecture/utilities/bskAbiDescriptor.h `` header is the single source of truth for the descriptor and
192+ plugin ABI versions, canary types, and compiler-side extraction rules. It is included by the existing BSK-SDK
193+ ``architecture `` header synchronization, allowing Basilisk and an SDK plugin to compile the same contract rather
194+ than maintaining parallel implementations.
195+
196+ ``diagnostics `` contains values observed by CMake, requested Conan settings, and build-tool versions. These remain
197+ useful when reproducing a build, but they are not all binary-compatibility requirements. For example, CMake and
198+ Conan versions should not be compared as part of an SDK compatibility decision. For Xcode and Visual Studio,
199+ ``diagnostics["build"] `` describes the multi-config generator while ``abi["build"]["configuration"] `` records the
200+ configuration that actually compiled the installed descriptor.
201+
202+ The standard-library ``pprint `` module provides an indented view when all recorded fields should be displayed::
203+
204+ from pprint import pprint
205+ from Basilisk import getBuildInfo
206+
207+ pprint(getBuildInfo(), sort_dicts=False, width=100)
208+
209+ Absolute build paths and timestamps are intentionally omitted from this metadata. Source revision is empty and
210+ dirty state is reported as ``None `` when the source was built without Git metadata.
211+
212+
134213Doing Incremental Builds
135214------------------------
136215If you are developing new Basilisk capabilities you will be looking to do incremental builds. Note that running
@@ -145,6 +224,11 @@ open the project file in your IDE and compile Basilisk there. The initial build
145224similar amount of time to compile the messaging related files. However, after making changes to a particular module,
146225only this Basilisk module will need to be compiled and the compile times are drastically reduced.
147226
227+ Every loadable BSK module target depends on ABI metadata generation, so an incremental module-only build refreshes the
228+ descriptor for the selected configuration. Internal libraries consume the same ABI settings but do not carry this
229+ dependency because multi-configuration generators share some of their generated sources. Do not mix Debug and Release
230+ module binaries in one Basilisk package; switching configurations requires rebuilding the complete package.
231+
148232
149233Speeding Up Builds with ``sccache ``
150234------------------------------------
0 commit comments