aboutsummaryrefslogtreecommitdiffstats
path: root/ninja.cc
diff options
context:
space:
mode:
Diffstat (limited to 'ninja.cc')
-rw-r--r--ninja.cc24
1 files changed, 12 insertions, 12 deletions
diff --git a/ninja.cc b/ninja.cc
index dc7b422..060daa7 100644
--- a/ninja.cc
+++ b/ninja.cc
@@ -173,8 +173,8 @@ class NinjaGenerator {
: ce_(ev), ev_(ev), fp_(NULL), rule_id_(0), start_time_(start_time) {
ev_->set_avoid_io(true);
shell_ = ev->EvalVar(kShellSym);
- if (g_goma_dir)
- gomacc_ = StringPrintf("%s/gomacc ", g_goma_dir);
+ if (g_flags.goma_dir)
+ gomacc_ = StringPrintf("%s/gomacc ", g_flags.goma_dir);
if (ninja_suffix) {
ninja_suffix_ = ninja_suffix;
}
@@ -364,7 +364,7 @@ class NinjaGenerator {
size_t cmd_start = cmd_buf->size();
StringPiece translated = TranslateCommand(in, cmd_buf);
- if (g_detect_android_echo && !got_descritpion && !c->echo &&
+ if (g_flags.detect_android_echo && !got_descritpion && !c->echo &&
GetDescriptionFromCommand(translated, description)) {
got_descritpion = true;
cmd_buf->resize(cmd_start);
@@ -372,7 +372,7 @@ class NinjaGenerator {
}
if (translated.empty()) {
*cmd_buf += "true";
- } else if (g_goma_dir) {
+ } else if (g_flags.goma_dir) {
size_t pos = GetGomaccPosForAndroidCompileCommand(translated);
if (pos != string::npos) {
cmd_buf->insert(cmd_start + pos, gomacc_);
@@ -410,7 +410,7 @@ class NinjaGenerator {
// A hack to exclude out phony target in Android. If this exists,
// "ninja -t clean" tries to remove this directory and fails.
- if (g_detect_android_echo && node->output.str() == "out")
+ if (g_flags.detect_android_echo && node->output.str() == "out")
return;
// This node is a leaf node
@@ -528,7 +528,7 @@ class NinjaGenerator {
}
void EmitRegenRules(const string& orig_args) {
- if (!g_gen_regen_rule)
+ if (!g_flags.gen_regen_rule)
return;
fprintf(fp_, "rule regen_ninja\n");
@@ -582,7 +582,7 @@ class NinjaGenerator {
}
fprintf(fp_, "pool local_pool\n");
- fprintf(fp_, " depth = %d\n\n", g_num_jobs);
+ fprintf(fp_, " depth = %d\n\n", g_flags.num_jobs);
fprintf(fp_, "build _kati_always_build_: phony\n\n");
@@ -627,9 +627,9 @@ class NinjaGenerator {
}
fprintf(fp, "exec ninja -f %s ", GetNinjaFilename().c_str());
- if (g_remote_num_jobs > 0) {
- fprintf(fp, "-j%d ", g_remote_num_jobs);
- } else if (g_goma_dir) {
+ if (g_flags.remote_num_jobs > 0) {
+ fprintf(fp, "-j%d ", g_flags.remote_num_jobs);
+ } else if (g_flags.goma_dir) {
fprintf(fp, "-j500 ");
}
fprintf(fp, "\"$@\"\n");
@@ -744,8 +744,8 @@ void GenerateNinja(const char* ninja_suffix,
}
static bool ShouldIgnoreDirty(StringPiece s) {
- return (g_ignore_dirty_pattern &&
- Pattern(g_ignore_dirty_pattern).Match(s));
+ return (g_flags.ignore_dirty_pattern &&
+ Pattern(g_flags.ignore_dirty_pattern).Match(s));
}
bool NeedsRegen(const char* ninja_suffix,