From eacf7f7ccd40a56d1fe761d3d30ced6c6acd58da Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 1 Nov 2018 13:00:16 +0200 Subject: Add support for rule-specific variables, use to fix cc.type data race --- build2/cc/link-rule.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'build2/cc/link-rule.cxx') diff --git a/build2/cc/link-rule.cxx b/build2/cc/link-rule.cxx index 230fc6f..ba6a22d 100644 --- a/build2/cc/link-rule.cxx +++ b/build2/cc/link-rule.cxx @@ -356,10 +356,10 @@ namespace build2 otype ot (lt.type); linfo li (link_info (bs, ot)); - // Set the library type (C, C++, etc). + // Set the library type (C, C++, etc) as rule-specific variable. // if (lt.library ()) - t.vars.assign (c_type) = string (x); + t.state[a].assign (c_type) = string (x); bool binless (lt.library ()); // Binary-less until proven otherwise. -- cgit v1.1