C++: Implement compilation_build_mode

This commit is contained in:
Calum Grant
2024-11-18 14:17:13 +00:00
parent 6a3e34cc4c
commit 6f3e6edd0e
2 changed files with 17 additions and 0 deletions

View File

@@ -112,4 +112,7 @@ class Compilation extends @compilation {
* termination, but crashing due to something like a segfault is not.
*/
predicate normalTermination() { compilation_finished(this, _, _) }
/** Holds if this compilation was compiled using the "none" build mode. */
predicate buildModeNone() { compilation_build_mode(this, 0) }
}

View File

@@ -46,6 +46,20 @@ compilation_args(
string arg : string ref
);
/**
* Optionally, record the build mode for each compilation.
* The build mode should be the same for all compilations.
* Build mode:
* 0 = none
* 1 = manual
* 2 = auto
*/
#keyset[id, mode]
compilation_build_mode(
int id : @compilation ref,
int mode : int ref
);
/**
* The source files that are compiled by a compiler invocation.
* If `id` is for the compiler invocation