Shinichiro Hamaji | 08808d3 | 2015-06-26 08:02:45 +0900 | [diff] [blame] | 1 | // 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 Hamaji | 003d06e | 2015-09-09 18:22:04 +0900 | [diff] [blame] | 18 | #include <string> |
| 19 | #include <vector> |
| 20 | |
| 21 | #include "string_piece.h" |
| 22 | #include "symtab.h" |
| 23 | |
| 24 | using namespace std; |
| 25 | |
| 26 | struct Flags { |
| 27 | bool detect_android_echo; |
| 28 | bool dump_kati_stamp; |
Shinichiro Hamaji | 644d6b9 | 2015-11-17 14:47:56 +0900 | [diff] [blame] | 29 | bool enable_kati_warnings; |
Shinichiro Hamaji | 003d06e | 2015-09-09 18:22:04 +0900 | [diff] [blame] | 30 | bool enable_stat_logs; |
Shinichiro Hamaji | 7223e7b | 2015-09-28 15:17:27 +0900 | [diff] [blame] | 31 | bool gen_all_targets; |
Shinichiro Hamaji | 003d06e | 2015-09-09 18:22:04 +0900 | [diff] [blame] | 32 | bool gen_regen_rule; |
| 33 | bool generate_ninja; |
| 34 | bool is_dry_run; |
| 35 | bool is_silent_mode; |
| 36 | bool is_syntax_check_only; |
| 37 | bool regen; |
| 38 | bool regen_ignoring_kati_binary; |
| 39 | bool use_find_emulator; |
| 40 | const char* goma_dir; |
| 41 | const char* ignore_dirty_pattern; |
Colin Cross | f23ae8c | 2015-11-12 17:05:32 -0800 | [diff] [blame] | 42 | const char* no_ignore_dirty_pattern; |
Shinichiro Hamaji | 003d06e | 2015-09-09 18:22:04 +0900 | [diff] [blame] | 43 | const char* ignore_optional_include_pattern; |
| 44 | const char* makefile; |
| 45 | const char* ninja_dir; |
| 46 | const char* ninja_suffix; |
| 47 | int num_jobs; |
| 48 | int remote_num_jobs; |
| 49 | vector<const char*> subkati_args; |
| 50 | vector<Symbol> targets; |
| 51 | vector<StringPiece> cl_vars; |
| 52 | |
| 53 | void Parse(int argc, char** argv); |
| 54 | }; |
| 55 | |
| 56 | extern Flags g_flags; |
Shinichiro Hamaji | 08808d3 | 2015-06-26 08:02:45 +0900 | [diff] [blame] | 57 | |
| 58 | #endif // FLAGS_H_ |