aboutsummaryrefslogtreecommitdiff
path: root/build2/context.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-02-10 08:15:48 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-02-13 12:42:42 +0200
commitabccaf9596461215fce0e32322133fb6c39be44f (patch)
tree3fc16a6e6142d65e6b47ae686ab845cc164478cc /build2/context.cxx
parentbcb2a89e111a918a48a132a2a29e0c26d724591d (diff)
Implement parallel error propagation, keep_going mode
Keep going is the default but there is now the -s|--serial-stop that makes the driver run serially and stop at first error. Also fix some lockups, other minor improvements/features.
Diffstat (limited to 'build2/context.cxx')
-rw-r--r--build2/context.cxx37
1 files changed, 34 insertions, 3 deletions
diff --git a/build2/context.cxx b/build2/context.cxx
index 400f68c..0357eb6 100644
--- a/build2/context.cxx
+++ b/build2/context.cxx
@@ -56,6 +56,8 @@ namespace build2
execution_mode current_mode;
+ bool keep_going = false;
+
atomic_count dependency_count;
variable_override_cache var_override_cache;
@@ -461,6 +463,35 @@ namespace build2
}
void
+ diag_did (ostream& os, const action&, const target& t)
+ {
+ const meta_operation_info& m (*current_mif);
+ const operation_info& io (*current_inner_oif);
+ const operation_info* oo (current_outer_oif);
+
+ // perform(update(x)) -> "updated x"
+ // configure(update(x)) -> "configured updating x"
+ //
+ if (!m.name_did.empty ())
+ {
+ os << m.name_did << ' ';
+
+ if (!io.name_doing.empty ())
+ os << io.name_doing << ' ';
+ }
+ else
+ {
+ if (!io.name_did.empty ())
+ os << io.name_did << ' ';
+ }
+
+ if (oo != nullptr)
+ os << "(for " << oo->name << ") ";
+
+ os << t;
+ }
+
+ void
diag_done (ostream& os, const action&, const target& t)
{
const meta_operation_info& m (*current_mif);
@@ -475,10 +506,10 @@ namespace build2
os << t;
if (!io.name_done.empty ())
- os << " " << io.name_done;
+ os << ' ' << io.name_done;
if (oo != nullptr)
- os << "(for " << oo->name << ") ";
+ os << " (for " << oo->name << ')';
}
else
{
@@ -488,7 +519,7 @@ namespace build2
if (oo != nullptr)
os << "(for " << oo->name << ") ";
- os << t << " " << m.name_done;
+ os << t << ' ' << m.name_done;
}
}
}