From 6293ede7a742866a713050737cc2b43d51161b6f Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 16 Feb 2018 16:24:07 +0200 Subject: Add support for detecting dependency cycles --- build2/test/rule.cxx | 12 ++++++------ build2/test/script/parser.cxx | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) (limited to 'build2/test') diff --git a/build2/test/rule.cxx b/build2/test/rule.cxx index b21f0c3..4225d24 100644 --- a/build2/test/rule.cxx +++ b/build2/test/rule.cxx @@ -498,20 +498,20 @@ namespace build2 if (!sched.async (target::count_busy (), t[a].task_count, - [this] (scope_state& r, + [this] (const diag_frame* ds, + scope_state& r, const target& t, const testscript& ts, - const dir_path& wd, - const diag_frame* ds) + const dir_path& wd) { - diag_frame df (ds); + diag_frame::stack_guard dsg (ds); r = perform_script_impl (t, ts, wd, *this); }, + diag_frame::stack, ref (r), cref (t), cref (ts), - cref (wd), - diag_frame::stack)) + cref (wd))) { // Executed synchronously. If failed and we were not asked to keep // going, bail out. diff --git a/build2/test/script/parser.cxx b/build2/test/script/parser.cxx index 69fe979..d3cab0a 100644 --- a/build2/test/script/parser.cxx +++ b/build2/test/script/parser.cxx @@ -3018,18 +3018,18 @@ namespace build2 // const diag_frame* df (diag_frame::stack); // UBSan workaround. if (!sched.async (task_count, - [] (scope& s, + [] (const diag_frame* ds, + scope& s, script& scr, - runner& r, - const diag_frame* ds) + runner& r) { - diag_frame df (ds); + diag_frame::stack_guard dsg (ds); execute_impl (s, scr, r); }, + df, ref (*chain), ref (*script_), - ref (*runner_), - df)) + ref (*runner_))) { // Bail out if the scope has failed and we weren't instructed // to keep going. -- cgit v1.1