31 "--show-symbol-table",
32 "--show-function-table",
44 "--string-abstraction",
53 "--compile_all_input",
54 "--no_compile_all_input",
65 "--reinitialize_workdir",
81 "--no_export_all_vtbl",
82 "--force_new_nothrow",
83 "--no_force_new_nothrow",
85 "--no_friend_injection",
89 "--no_implicit_include",
90 "--implicit_include_searches",
91 "--no_implicit_include_searches",
92 "--implicit_typename",
93 "--no_implicit_typename",
94 "--nonstd_qualifier_deduction",
95 "--no_nonstd_qualifier_deduction",
96 "--old_specializations",
97 "--no_old_specializations",
99 "--no_parse_templates",
108 "--depend_system_headers",
109 "--no_depend_system_headers",
124 "--remove_unneeded_entities",
125 "--no_remove_unneeded_entities",
126 "--alternative_tokens",
127 "--no_alternative_tokens",
136 "--exceptions_unwind",
137 "--no_exceptions_unwind",
139 "--no_export_all_vtbl",
140 "--export_defs_implicitly",
141 "--no_export_defs_implicitly",
142 "--extend_initializers",
143 "--no_extend_initializers",
147 "--loose_implicit_cast",
149 "--no_multibyte_chars",
150 "--narrow_volatile_bitfields",
153 "--signed_bitfields",
154 "--unsigned_bitfields",
158 "--unaligned_access",
159 "--no_unaligned_access",
186 "--brief_diagnostics",
187 "--no_brief_diagnostics",
189 "--wrap_diagnostics",
190 "--no_wrap_diagnostics",
192 "--arm_linux_configure",
210 "--pending_instantiations=",
212 "--default_extension=",
227 "--min_array_alignment=",
228 "--pointer_alignment=",
230 "--library_interface=",
243 "--arm_linux_config_file=",
246 "--configure_sysroot=",
247 "--configure_cpp_headers=",
248 "--configure_extra_includes=",
249 "--configure_extra_libraries="
272 std::optional<std::string>
276 std::find_if(list.cbegin(), list.cend(), [&](
const std::string &argument) {
277 return has_prefix(argument, option);
279 if(found == list.cend())
286 for(
int i=1; i<argc; i++)
288 if(
strcmp(argv[i],
"-")==0 ||
291 args.push_back(argv[i]);
296 std::optional<std::string> prefix;
306 if(
strlen(argv[i]) > prefix->size())
307 set(*prefix, std::string(argv[i], prefix->size(), std::string::npos));
313 set(*prefix, argv[i + 1]);
323 set(*prefix, std::string(argv[i], prefix->size(), std::string::npos));
327 std::cout <<
"Warning: uninterpreted armcc option '"
std::optional< std::string > prefix_in_list(const std::string &option, const std::vector< std::string > &list)
static const char * options_no_arg[]
parses the command line options into a cmdlinet
static const std::vector< std::string > options_with_arg
static const std::vector< std::string > options_with_prefix
A special command line object to mimic ARM's armcc.
void set(const std::string &opt, const char *value) override
Set option option to value.
static bool in_list(const char *option, const char **list)
virtual bool parse(int argc, const char **argv, const char *optstring)
Parses a commandline according to a specification given in optstring.
int strcmp(const char *s1, const char *s2)
size_t strlen(const char *s)