aboutsummaryrefslogtreecommitdiff
path: root/build2/cc/msvc.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2019-08-22 14:38:57 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2019-08-23 18:14:07 +0200
commit5035f4ef68922ac758b1e4734e67d73c9228010b (patch)
tree271fdd5b1d6e995a058d97aacb3ac90a538d9ff1 /build2/cc/msvc.cxx
parent8793941652d6aa1c3d02b2f87f691e6d06254b7d (diff)
Introduce notion of build context
All non-const global state is now in class context and we can now have multiple independent builds going on at the same time.
Diffstat (limited to 'build2/cc/msvc.cxx')
-rw-r--r--build2/cc/msvc.cxx9
1 files changed, 7 insertions, 2 deletions
diff --git a/build2/cc/msvc.cxx b/build2/cc/msvc.cxx
index 6125fdd..7d8c3f5 100644
--- a/build2/cc/msvc.cxx
+++ b/build2/cc/msvc.cxx
@@ -365,6 +365,7 @@ namespace build2
{
// Pretty similar logic to search_library().
//
+ assert (p.scope != nullptr);
const optional<string>& ext (p.tk.ext);
const string& name (*p.tk.name);
@@ -403,7 +404,7 @@ namespace build2
// Enter the target.
//
T* t;
- common::insert_library (t, name, d, e, exist, trace);
+ common::insert_library (p.scope->ctx, t, name, d, e, exist, trace);
t->mtime (mt);
t->path (move (f));
@@ -453,6 +454,8 @@ namespace build2
{
tracer trace (x, "msvc_search_shared");
+ assert (pk.scope != nullptr);
+
libs* s (nullptr);
auto search = [&s, &ld, &d, &pk, exist, &trace] (
@@ -461,7 +464,9 @@ namespace build2
if (libi* i = msvc_search_library<libi> (
ld, d, pk, otype::s, pf, sf, exist, trace))
{
- ulock l (insert_library (s, *pk.tk.name, d, nullopt, exist, trace));
+ ulock l (
+ insert_library (
+ pk.scope->ctx, s, *pk.tk.name, d, nullopt, exist, trace));
if (!exist)
{