blob: 36a12e8a46315fa5e1c983aafc24e561a6cb0a3c [file] [log] [blame]
Shinichiro Hamaji08808d32015-06-26 08:02:45 +09001// Copyright 2015 Google Inc. All rights reserved
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15#ifndef FLAGS_H_
16#define FLAGS_H_
17
Shinichiro Hamaji003d06e2015-09-09 18:22:04 +090018#include <string>
19#include <vector>
20
21#include "string_piece.h"
22#include "symtab.h"
23
24using namespace std;
25
26struct Flags {
27 bool detect_android_echo;
Shinichiro Hamajif3ad9e02016-03-03 18:26:17 +090028 bool detect_depfiles;
Shinichiro Hamaji003d06e2015-09-09 18:22:04 +090029 bool dump_kati_stamp;
Shinichiro Hamajic58db9a2016-05-12 15:16:12 +090030 bool enable_debug;
Shinichiro Hamaji644d6b92015-11-17 14:47:56 +090031 bool enable_kati_warnings;
Shinichiro Hamaji003d06e2015-09-09 18:22:04 +090032 bool enable_stat_logs;
Shinichiro Hamaji7223e7b2015-09-28 15:17:27 +090033 bool gen_all_targets;
Shinichiro Hamaji003d06e2015-09-09 18:22:04 +090034 bool generate_ninja;
35 bool is_dry_run;
36 bool is_silent_mode;
37 bool is_syntax_check_only;
38 bool regen;
Dan Willemsenf6486ce2016-09-16 19:21:36 -070039 bool regen_debug;
Shinichiro Hamaji003d06e2015-09-09 18:22:04 +090040 bool regen_ignoring_kati_binary;
41 bool use_find_emulator;
Dan Willemsene41c7552017-02-22 14:31:16 -080042 bool color_warnings;
Dan Willemsencf1fa882018-06-10 12:48:47 -070043 bool no_builtin_rules;
Dan Willemsenf63a3fd2017-04-27 23:39:57 -070044 bool werror_find_emulator;
45 bool werror_overriding_commands;
Dan Willemsen6aafee62018-06-10 12:48:47 -070046 bool warn_implicit_rules;
47 bool werror_implicit_rules;
48 bool warn_suffix_rules;
49 bool werror_suffix_rules;
Shinichiro Hamaji003d06e2015-09-09 18:22:04 +090050 const char* goma_dir;
51 const char* ignore_dirty_pattern;
Colin Crossf23ae8c2015-11-12 17:05:32 -080052 const char* no_ignore_dirty_pattern;
Shinichiro Hamaji003d06e2015-09-09 18:22:04 +090053 const char* ignore_optional_include_pattern;
54 const char* makefile;
55 const char* ninja_dir;
56 const char* ninja_suffix;
Shinichiro Hamaji1a444a82016-02-16 13:49:49 +090057 int num_cpus;
Shinichiro Hamaji003d06e2015-09-09 18:22:04 +090058 int num_jobs;
59 int remote_num_jobs;
60 vector<const char*> subkati_args;
61 vector<Symbol> targets;
62 vector<StringPiece> cl_vars;
63
64 void Parse(int argc, char** argv);
65};
66
67extern Flags g_flags;
Shinichiro Hamaji08808d32015-06-26 08:02:45 +090068
69#endif // FLAGS_H_