int i;
bool found_c_opt = false;
bool found_S_opt = false;
- bool found_arch_opt = false;
+ const char *found_arch = NULL;
bool found_pch = false;
bool found_fpch_preprocess = false;
const char *explicit_language = NULL; /* As specified with -x. */
/* Multiple -arch options are too hard. */
if (str_eq(argv[i], "-arch")) {
- if (found_arch_opt) {
- cc_log("More than one -arch compiler option is unsupported");
- stats_update(STATS_UNSUPPORTED);
- result = false;
- goto out;
+ if (found_arch) {
+ if (!str_eq(found_arch, argv[i+1])) {
+ cc_log("More than one different -arch compiler options is unsupported. Found %s and %s.", found_arch, argv[i+1]);
+ stats_update(STATS_UNSUPPORTED);
+ result = false;
+ goto out;
+ }
} else {
- found_arch_opt = true;
+ found_arch = argv[i+1];
}
}