From 05afdd8ca16c7066d12510a27e2fc08743bb2e95 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 29 Nov 2022 08:02:51 +0200 Subject: Fix backlink logic for target groups We used to backlink ad hoc group members both via the group and as individual members. And for explicit groups it was done only via individual members, which means it only works correctly if every member is individually updated. Now both types of groups are backlinked from the group target. --- libbuild2/diagnostics.hxx | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'libbuild2/diagnostics.hxx') diff --git a/libbuild2/diagnostics.hxx b/libbuild2/diagnostics.hxx index 397d3c0..c048d5b 100644 --- a/libbuild2/diagnostics.hxx +++ b/libbuild2/diagnostics.hxx @@ -69,6 +69,9 @@ namespace build2 // {hxx cxx}{foo-stubs} -> {hxx cxx}{foo-insts} // {hxx cxx}{foo-impls} // + // Currently we only support this for the `group -> dir_path` form (used + // by the backlink machinery). + // // See also the `diag` Buildscript pseudo-builtin which is reduced to one of // the print_diag() calls (adhoc_buildscript_rule::print_custom_diag()). In // particular, if you are adding a new overload, also consider if/how it @@ -196,6 +199,18 @@ namespace build2 const target& l, const path_name_view& r, const char* comb = nullptr); + LIBBUILD2_SYMEXPORT void + print_diag (const char* prog, + target_key&& l, const dir_path& r, + const char* comb = nullptr); + + // prog group -> dir_path + // + LIBBUILD2_SYMEXPORT void + print_diag (const char* prog, + vector&& l, const dir_path& r, + const char* comb = nullptr); + // prog path -> path // void -- cgit v1.1