aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/cc/install-rule.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2023-11-22 11:21:52 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2023-11-22 11:21:52 +0200
commita244bdcd7e9b246ec9baefd225fc56f2ebf5221f (patch)
treeb6273e3e53b69817cff3939ce7b95a491236da5e /libbuild2/cc/install-rule.cxx
parent45c81c3c0fdc3da7a31910bdb657ad4ebbfa8663 (diff)
Fix cc::link_rule and cc::install_rule to recognize S{} even in C++
Failed that, a C++ link rule cannot match a dependency with S{} prerequisites.
Diffstat (limited to 'libbuild2/cc/install-rule.cxx')
-rw-r--r--libbuild2/cc/install-rule.cxx24
1 files changed, 14 insertions, 10 deletions
diff --git a/libbuild2/cc/install-rule.cxx b/libbuild2/cc/install-rule.cxx
index 28d1a58..6758e03 100644
--- a/libbuild2/cc/install-rule.cxx
+++ b/libbuild2/cc/install-rule.cxx
@@ -228,11 +228,13 @@ namespace build2
//
auto header_source = [this] (const auto& p)
{
- return (x_header (p) ||
- p.is_a (x_src) ||
- (x_mod != nullptr && p.is_a (*x_mod)) ||
- (x_asp != nullptr && p.is_a (*x_asp)) ||
- (x_obj != nullptr && p.is_a (*x_obj)));
+ return (x_header (p) ||
+ p.is_a (x_src) ||
+ p.is_a (c::static_type) ||
+ p.is_a (S::static_type) ||
+ (x_mod != nullptr && p.is_a (*x_mod)) ||
+ (x_obj != nullptr && (p.is_a (*x_obj) ||
+ p.is_a (m::static_type))));
};
if (t.is_a<exe> () ||
@@ -643,11 +645,13 @@ namespace build2
auto header_source = [this] (const auto& p)
{
- return (x_header (p) ||
- p.is_a (x_src) ||
- (x_mod != nullptr && p.is_a (*x_mod)) ||
- (x_asp != nullptr && p.is_a (*x_asp)) ||
- (x_obj != nullptr && p.is_a (*x_obj)));
+ return (x_header (p) ||
+ p.is_a (x_src) ||
+ p.is_a (c::static_type) ||
+ p.is_a (S::static_type) ||
+ (x_mod != nullptr && p.is_a (*x_mod)) ||
+ (x_obj != nullptr && (p.is_a (*x_obj) ||
+ p.is_a (m::static_type))));
};
if (t.is_a<libue> () ||