aboutsummaryrefslogtreecommitdiff
path: root/build2/b.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'build2/b.cxx')
-rw-r--r--build2/b.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/build2/b.cxx b/build2/b.cxx
index 2ada09b..15ace65 100644
--- a/build2/b.cxx
+++ b/build2/b.cxx
@@ -321,6 +321,11 @@ main (int argc, char* argv[])
trace << "jobs: " << jobs;
}
+ // Set the build state before parsing the buildspec since it relies on
+ // global scope being setup.
+ //
+ variable_overrides var_ovs (reset (cmd_vars));
+
// Parse the buildspec.
//
buildspec bspec;
@@ -349,8 +354,7 @@ main (int argc, char* argv[])
//
opspec* lifted (nullptr);
size_t skip (0);
- bool dirty (true);
- variable_overrides var_ovs;
+ bool dirty (false); // We already (re)set for the first run.
for (auto mit (bspec.begin ()); mit != bspec.end (); )
{