int found_c_opt = 0;
int found_S_opt = 0;
char *input_file = NULL;
+ struct stat st;
stripped_args = args_init();
continue;
}
+ /* if an argument isn't a plain file then assume its
+ an option, not an input file. This allows us to
+ cope better with unusual compiler options */
+ if (stat(argv[i], &st) != 0 || !S_ISREG(st.st_mode)) {
+ args_add(stripped_args, argv[i]);
+ continue;
+ }
+
if (input_file) {
cc_log("multiple input files (%s and %s)\n",
input_file, argv[i]);