From bbe8cbd13c40a1309e0d7724319c5487a5df0879 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 21 Jun 2022 10:04:07 +0200 Subject: Add --trace-{match,execute} options These options can be used to understand which dependency chain causes matching or execution of a particular target. --- libbuild2/context.hxx | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'libbuild2/context.hxx') diff --git a/libbuild2/context.hxx b/libbuild2/context.hxx index ad7fdff..d4cf9ff 100644 --- a/libbuild2/context.hxx +++ b/libbuild2/context.hxx @@ -219,6 +219,14 @@ namespace build2 // bool keep_going; + // Targets to trace (see the --trace-* options). + // + // Note that these must be set after construction and must remain valid + // for the lifetime of the context instance. + // + const vector* trace_match = nullptr; + const vector* trace_execute = nullptr; + // In order to perform each operation the build system goes through the // following phases: // @@ -588,6 +596,9 @@ namespace build2 // properly setup context (including, normally, a self-reference in // modules_context). // + // Note: see also the trace_* data members that, if needed, must be set + // separately, after construction. + // explicit context (scheduler&, global_mutexes&, -- cgit v1.1