diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2020-05-13 07:14:50 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2020-05-27 08:35:29 +0200 |
commit | 741cce26c1caeacc0e578a8bef1efefa993adcc1 (patch) | |
tree | be3dcd6db8c1fea92ada21a6fa8f88fd53047aec /libbuild2/cc | |
parent | 9a0f07035b34a356ce9b5601d71d388595762184 (diff) |
Initial support for ad hoc C++ recipes
Diffstat (limited to 'libbuild2/cc')
-rw-r--r-- | libbuild2/cc/compile-rule.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/libbuild2/cc/compile-rule.cxx b/libbuild2/cc/compile-rule.cxx index 8b082cc..6b9104f 100644 --- a/libbuild2/cc/compile-rule.cxx +++ b/libbuild2/cc/compile-rule.cxx @@ -5247,6 +5247,8 @@ namespace build2 dir_path compile_rule:: find_modules_sidebuild (const scope& rs) const { + context& ctx (rs.ctx); + // First figure out where we are going to build. We want to avoid // multiple sidebuilds so the outermost scope that has loaded the // cc.config module and that is within our amalgmantion seems like a @@ -5284,18 +5286,18 @@ namespace build2 modules_sidebuild_dir /= x); - const scope* ps (&rs.ctx.scopes.find (pd)); + const scope* ps (&ctx.scopes.find (pd)); if (ps->out_path () != pd) { // Switch the phase to load then create and load the subproject. // - phase_switch phs (rs.ctx, run_phase::load); + phase_switch phs (ctx, run_phase::load); // Re-test again now that we are in exclusive phase (another thread // could have already created and loaded the subproject). // - ps = &rs.ctx.scopes.find (pd); + ps = &ctx.scopes.find (pd); if (ps->out_path () != pd) { @@ -5322,15 +5324,13 @@ namespace build2 {string (x) + '.'}, /* root_modules */ "", /* root_post */ nullopt, /* config_module */ + nullopt, /* config_file */ false, /* buildfile */ "the cc module", 2); /* verbosity */ } - ps = &load_project (as->rw () /* lock */, - pd, - pd, - false /* forwarded */); + ps = &load_project (ctx, pd, pd, false /* forwarded */); } } |