From edebb385b1a3ae9964664b6c8e2de228341a6009 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Thu, 31 Jul 2025 21:59:00 +0200 Subject: [PATCH] We can now have generated checks on the finalized config as well Signed-off-by: Gilles Peskine --- docs/architecture/config-check-framework.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/architecture/config-check-framework.md b/docs/architecture/config-check-framework.md index c6a0459f7..bfdb4cb96 100644 --- a/docs/architecture/config-check-framework.md +++ b/docs/architecture/config-check-framework.md @@ -118,10 +118,11 @@ These are internal headers, included by one library file. This way, we run the c ### Behavior of the generated checks -The generated checks consist of two parts: +The generated checks consist of three parts: 1. Some initial setup in `*_before.h`, to detect the situation before including the user's configuration file (but after the command line — this is unavoidable). This header is included before `build_info.h`. -2. The actual checks, in `*_after.h`. This header also cleans up by undefining some temporary macros. This header is included by `build_info.h` after reading the user's configuration files, but before defining derived macros in `*adjust*.h`. (This is not the normal behavior of `build_info.h`, it is done conditionally based on a macro that must be defined before including `build_info.h`.) +2. The actual checks on the user configuration, in `*_after.h`. This header should also clean up by undefining some temporary macros. This header is included by `build_info.h` after reading the user's configuration files, but before defining derived macros in `*adjust*.h`. (This is not the normal behavior of `build_info.h`, it is done only if the file that includes `build_info.h` defines the macro PROJECT\_NAME\_INCLUDE\_AFTER\_RAW\_CONFIG.) +3. Additional checks that can be performed on the final configuration. At the time of writing, all such checks are [written manually](#manually-written-checks), but the infrastructure is in place if we want to generate some. ### How the checks are generated