aboutsummaryrefslogtreecommitdiff
path: root/main.cc
diff options
context:
space:
mode:
Diffstat (limited to 'main.cc')
-rw-r--r--main.cc14
1 files changed, 5 insertions, 9 deletions
diff --git a/main.cc b/main.cc
index c732dda..a64a37e 100644
--- a/main.cc
+++ b/main.cc
@@ -21,7 +21,6 @@
#include <time.h>
#include <unistd.h>
-#include "affinity.h"
#include "dep.h"
#include "eval.h"
#include "exec.h"
@@ -124,7 +123,7 @@ static int Run(const vector<Symbol>& targets,
if (g_flags.generate_ninja && (g_flags.regen || g_flags.dump_kati_stamp)) {
ScopedTimeReporter tr("regen check time");
if (!NeedsRegen(start_time, orig_args)) {
- fprintf(stderr, "No need to regenerate ninja file\n");
+ printf("No need to regenerate ninja file\n");
return 0;
}
if (g_flags.dump_kati_stamp) {
@@ -134,14 +133,9 @@ static int Run(const vector<Symbol>& targets,
ClearGlobCache();
}
- SetAffinityForSingleThread();
-
MakefileCacheManager* cache_mgr = NewMakefileCacheManager();
Vars* vars = new Vars();
- vars->Assign(Intern("MAKEFILE_LIST"),
- new SimpleVar(StringPrintf(" %s", g_flags.makefile),
- VarOrigin::FILE));
for (char** p = environ; *p; p++) {
SetVar(*p, VarOrigin::ENVIRONMENT, vars);
}
@@ -160,6 +154,10 @@ static int Run(const vector<Symbol>& targets,
SetVar(l, VarOrigin::COMMAND_LINE, ev->mutable_vars());
}
+ vars->Assign(Intern("MAKEFILE_LIST"),
+ new SimpleVar(StringPrintf(" %s", g_flags.makefile),
+ VarOrigin::FILE));
+
{
ScopedTimeReporter tr("eval time");
Makefile* mk = cache_mgr->ReadMakefile(g_flags.makefile);
@@ -210,8 +208,6 @@ static int Run(const vector<Symbol>& targets,
for (Stmt* stmt : bootstrap_asts)
delete stmt;
delete ev;
- // Each Var will be deleted by |ev|.
- vars->clear();
delete vars;
delete cache_mgr;