diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2023-04-05 08:07:47 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2023-04-05 08:07:47 +0200 |
commit | 2905180c48e4b8974d4dee1949a00fc8e7bcafc6 (patch) | |
tree | 0dde0185bcbe36da05200c64ab12bb3b9af528c6 /libbuild2/module.cxx | |
parent | 8b9701d2ad76a9a571c445b318557261a4922758 (diff) |
Allow creating context with bare minimum of initializations
This is used by bpkg to detect forwarded configurations without incurring
the full context creation overhead.
Diffstat (limited to 'libbuild2/module.cxx')
-rw-r--r-- | libbuild2/module.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libbuild2/module.cxx b/libbuild2/module.cxx index 234b469..0928307 100644 --- a/libbuild2/module.cxx +++ b/libbuild2/module.cxx @@ -81,9 +81,9 @@ namespace build2 // adding a reasonable margin for future growth. // ctx.module_context_storage->reset ( - new context (ctx.sched, - ctx.mutexes, - ctx.fcache, + new context (*ctx.sched, + *ctx.mutexes, + *ctx.fcache, false, /* match_only */ false, /* no_external_modules */ false, /* dry_run */ @@ -144,8 +144,8 @@ namespace build2 // keep it in case things change. Actually, we may need it, if the // scheduler was started up in a tuned state, like in bpkg). // - auto sched_tune (ctx.sched.serial () - ? scheduler::tune_guard (ctx.sched, 0) + auto sched_tune (ctx.sched->serial () + ? scheduler::tune_guard (*ctx.sched, 0) : scheduler::tune_guard ()); // Remap verbosity level 0 to 1 unless we were requested to be silent. @@ -429,7 +429,7 @@ namespace build2 // auto_thread_env penv (nullptr); context& ctx (*bs.ctx.module_context); - scheduler::phase_guard pg (ctx.sched); + scheduler::phase_guard pg (*ctx.sched); // Load the imported project in the module context. // |