LUMIERA.clone/doc
Ichthyostega 109d682408 Buildsystem: generate a compilation database for clangd (closes: #1436)
Knowledge-Technology(Claude Opus 5) used
 - to assess the situation and present implementation avenues
 - for discussion while shaping the solution
 - for generating code and validating results

Clang based tooling is used frequently for code analysis and navigation.
This requires however that the exact flags and invocation is captured for
each possible translation unit in the code base. That knowledge exists solely
in the build system, and the established way to hand it over is the
LLVM "JSON Compilation Database".

SCons has provided a `CompilationDatabase` builder since 4.0, and it fits
our setup well: it installs an emitter on the object builders and captures
each command line while the dependency graph is constructed. Hence nothing
is compiled -- generating takes about two seconds -- and the result always
describes the complete build graph as declared, rather than the target
actually requested on this invocation.

This feature is provided as ''opt-in'', either through the sticky option
`COMPILEDB=yes` or by direct invocation with `scons compiledb`

The `compile_commands.json` is generated into the build output `target/' dir
For configuration, a `.clangd` in project root instructs the language server
where to find this file.

__Note__ the ordering constraint recorded in `CompileDB.py`:
the emitter must be installed only after `Platform.configure()` has run,
or it also captures the `conftest_*` compilations of the configure checks.
That is why this is a plain helper invoked from the `SConstruct` -- similar to
Setup, Options, Platform -- and not a tool loaded from the `LumieraEnvironment`.
2026-10-01 01:08:23 +02:00
..
design Workflow-publish: include (and rename) images 2026-05-09 17:26:40 +02:00
devel Establish DataSink identity and fix remaining tests 2026-06-01 23:55:10 +02:00
technical Buildsystem: generate a compilation database for clangd (closes: #1436) 2026-10-01 01:08:23 +02:00
user DOC: minor wording improvements 2026-03-04 12:52:04 +01:00
.gitignore infrastructure to test the documentation standalone 2018-11-01 04:38:17 +01:00
DIR_INFO spelling fixes 2011-02-06 02:12:55 +01:00
index.txt Application: Adjustments to the Layer structure 2026-03-03 22:16:09 +01:00
SConscript Build: provide a placeholder page for the (planned) User-Manual 2025-11-18 23:09:54 +01:00