aboutsummaryrefslogtreecommitdiff
path: root/build2/cc
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2019-08-23 08:02:15 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2019-08-23 08:02:15 +0200
commit6cc8301e4fb819393c1245cea0fbfb89e69b90b4 (patch)
tree33e20e06841b107600dfa9bce551ef9d723be497 /build2/cc
parent604cef5bc09a2c4631eb3948dd788381dc5b4edb (diff)
Meta/operations and counts
Diffstat (limited to 'build2/cc')
-rw-r--r--build2/cc/compile-rule.cxx6
-rw-r--r--build2/cc/link-rule.cxx9
2 files changed, 8 insertions, 7 deletions
diff --git a/build2/cc/compile-rule.cxx b/build2/cc/compile-rule.cxx
index f600f76..6902bb6 100644
--- a/build2/cc/compile-rule.cxx
+++ b/build2/cc/compile-rule.cxx
@@ -698,7 +698,7 @@ namespace build2
// Start asynchronous matching of prerequisites. Wait with unlocked
// phase to allow phase switching.
//
- wait_guard wg (t.ctx, target::count_busy (), t[a].task_count, true);
+ wait_guard wg (t.ctx, t.ctx.count_busy (), t[a].task_count, true);
size_t start (pts.size ()); // Index of the first to be added.
for (prerequisite_member p: group_prerequisite_members (a, t))
@@ -760,7 +760,7 @@ namespace build2
continue;
}
- match_async (a, *pt, target::count_busy (), t[a].task_count);
+ match_async (a, *pt, t.ctx.count_busy (), t[a].task_count);
pts.push_back (prerequisite_target (pt, pi));
}
@@ -5585,7 +5585,7 @@ namespace build2
{
touch (tp, false, 2);
t.mtime (system_clock::now ());
- skip_count.fetch_add (1, memory_order_relaxed);
+ t.ctx.skip_count.fetch_add (1, memory_order_relaxed);
}
// Note: else mtime should be cached.
diff --git a/build2/cc/link-rule.cxx b/build2/cc/link-rule.cxx
index 57772a9..3d99535 100644
--- a/build2/cc/link-rule.cxx
+++ b/build2/cc/link-rule.cxx
@@ -484,6 +484,7 @@ namespace build2
tracer trace (x, "link_rule::apply");
file& t (xt.as<file> ());
+ context& ctx (t.ctx);
// Note that for_install is signalled by install_rule and therefore
// can only be relied upon during execute.
@@ -698,7 +699,7 @@ namespace build2
// Note that ad hoc inputs have to be explicitly marked with the
// include=adhoc prerequisite-specific variable.
//
- if (current_outer_oif != nullptr)
+ if (ctx.current_outer_oif != nullptr)
continue;
}
@@ -1164,7 +1165,7 @@ namespace build2
bool u;
if ((u = pt->is_a<libux> ()) || pt->is_a<liba> ())
{
- const variable& var (t.ctx.var_pool["bin.whole"]); // @@ Cache.
+ const variable& var (ctx.var_pool["bin.whole"]); // @@ Cache.
// See the bin module for the lookup semantics discussion. Note
// that the variable is not overridable so we omit find_override()
@@ -1198,7 +1199,7 @@ namespace build2
// Wait with unlocked phase to allow phase switching.
//
- wait_guard wg (t.ctx, target::count_busy (), t[a].task_count, true);
+ wait_guard wg (ctx, ctx.count_busy (), t[a].task_count, true);
i = start;
for (prerequisite_member p: group_prerequisite_members (a, t))
@@ -1230,7 +1231,7 @@ namespace build2
}
}
- match_async (a, *pt, target::count_busy (), t[a].task_count);
+ match_async (a, *pt, ctx.count_busy (), t[a].task_count);
mark (pt, m);
}