aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/cc
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2022-04-19 04:39:45 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2022-04-19 04:39:45 +0200
commit457f65414031f45174f3c35230a0c0e1de88b51a (patch)
treeb13e1e2e2291e65d2b22058706909d8df0cc59c2 /libbuild2/cc
parent950a84c337f317388cf39a3820125e049c598b8d (diff)
Switch to using std::function for target::data_pad
Diffstat (limited to 'libbuild2/cc')
-rw-r--r--libbuild2/cc/compile-rule.cxx3
-rw-r--r--libbuild2/cc/install-rule.cxx3
-rw-r--r--libbuild2/cc/link-rule.cxx5
3 files changed, 2 insertions, 9 deletions
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<libs> ())
{
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<match_data> ());
const scope& bs (t.base_scope ());
const scope& rs (*bs.root_scope ());