From 457f65414031f45174f3c35230a0c0e1de88b51a Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 19 Apr 2022 04:39:45 +0200 Subject: Switch to using std::function for target::data_pad --- libbuild2/cc/compile-rule.cxx | 3 --- libbuild2/cc/install-rule.cxx | 3 --- libbuild2/cc/link-rule.cxx | 5 ++--- 3 files changed, 2 insertions(+), 9 deletions(-) (limited to 'libbuild2/cc') diff --git a/libbuild2/cc/compile-rule.cxx b/libbuild2/cc/compile-rule.cxx index c72c94c..f680001 100644 --- a/libbuild2/cc/compile-rule.cxx +++ b/libbuild2/cc/compile-rule.cxx @@ -252,9 +252,6 @@ namespace build2 : common (move (d)), rule_id (string (x) += ".compile 6") { - static_assert (sizeof (match_data) <= target::data_size, - "insufficient space"); - // Locate the header cache (see enter_header() for details). // { diff --git a/libbuild2/cc/install-rule.cxx b/libbuild2/cc/install-rule.cxx index e8c87ae..d83bf70 100644 --- a/libbuild2/cc/install-rule.cxx +++ b/libbuild2/cc/install-rule.cxx @@ -192,9 +192,6 @@ namespace build2 // storage if we are un/installing (used in the *_extra() functions // below). // - static_assert (sizeof (link_rule::libs_paths) <= target::data_size, - "insufficient space"); - if (file* f = t.is_a ()) { if (!f->path ().empty ()) // Not binless. diff --git a/libbuild2/cc/link-rule.cxx b/libbuild2/cc/link-rule.cxx index 5462371..f2e3775 100644 --- a/libbuild2/cc/link-rule.cxx +++ b/libbuild2/cc/link-rule.cxx @@ -256,8 +256,6 @@ namespace build2 : common (move (d)), rule_id (string (x) += ".link 3") { - static_assert (sizeof (match_data) <= target::data_size, - "insufficient space"); } link_rule::match_result link_rule:: @@ -877,7 +875,8 @@ namespace build2 // Note that for_install is signalled by install_rule and therefore // can only be relied upon during execute. // - match_data& md (t.data (match_data ())); + t.data (match_data ()); + match_data& md (t.data ()); const scope& bs (t.base_scope ()); const scope& rs (*bs.root_scope ()); -- cgit v1.1