diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2023-08-22 14:16:56 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2023-08-22 14:16:56 +0200 |
commit | 151b9cf30d11a014503b0a060a6bb7875c509adf (patch) | |
tree | 2fdf884b232bc8886a8e3f0f3027b21897b1be66 /libbuild2/cc/link-rule.cxx | |
parent | 18e079b37794dc97b6c51045476bf43296b56dd3 (diff) |
Consider *_inc{} target types as headers for rule match purposes
Diffstat (limited to 'libbuild2/cc/link-rule.cxx')
-rw-r--r-- | libbuild2/cc/link-rule.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libbuild2/cc/link-rule.cxx b/libbuild2/cc/link-rule.cxx index e47a40d..58359aa 100644 --- a/libbuild2/cc/link-rule.cxx +++ b/libbuild2/cc/link-rule.cxx @@ -436,9 +436,12 @@ namespace build2 r.seen_lib = true; } // Some other c-common header/source (say C++ in a C rule) other than - // a C header (we assume everyone can hanle that). + // a C header (we assume everyone can hanle that) or some other + // #include'able target. // - else if (p.is_a<cc> () && !(x_header (p, true /* c_hdr */))) + else if (p.is_a<cc> () && + !(x_header (p, true /* c_hdr */)) && + !p.is_a (x_inc) && !p.is_a<c_inc> ()) { r.seen_cc = true; break; |