From 151b9cf30d11a014503b0a060a6bb7875c509adf Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 22 Aug 2023 14:16:56 +0200 Subject: Consider *_inc{} target types as headers for rule match purposes --- libbuild2/cc/compile-rule.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'libbuild2/cc/compile-rule.cxx') diff --git a/libbuild2/cc/compile-rule.cxx b/libbuild2/cc/compile-rule.cxx index fa46332..35d77f8 100644 --- a/libbuild2/cc/compile-rule.cxx +++ b/libbuild2/cc/compile-rule.cxx @@ -483,8 +483,8 @@ namespace build2 // For a header unit we check the "real header" plus the C header. // - if (ut == unit_type::module_header ? p.is_a (**x_hdr) || p.is_a () : - ut == unit_type::module_intf ? p.is_a (*x_mod) : + if (ut == unit_type::module_header ? p.is_a (**x_hdrs) || p.is_a () : + ut == unit_type::module_intf ? p.is_a (*x_mod) : p.is_a (x_src) || (x_asp != nullptr && p.is_a (*x_asp)) || (x_obj != nullptr && p.is_a (*x_obj))) @@ -3091,7 +3091,7 @@ namespace build2 // single "version" of a header. Seems reasonable. // // Note also that while it would have been nice to have a unified cc - // cache, the map_extension() call is passed x_inc which is module- + // cache, the map_extension() call is passed x_incs which is module- // specific. In other words, we may end up mapping the same header to // two different targets depending on whether it is included from, say, // C or C++ translation unit. We could have used a unified cache for @@ -3155,7 +3155,7 @@ namespace build2 fp, cache, norm, [this] (const scope& bs, const string& n, const string& e) { - return map_extension (bs, n, e, x_inc); + return map_extension (bs, n, e, x_incs); }, h::static_type, [this, &d] (action a, const scope& bs, const target& t) -- cgit v1.1