| ... | @@ -978,20 +978,9 @@ static int main0(int argc, char **argv) { | ... | @@ -978,20 +978,9 @@ static int main0(int argc, char **argv) { |
| 978 | | 978 | |
| 979 | ZigTarget target; | 979 | ZigTarget target; |
| 980 | if ((err = target_parse_triple(&target, target_string, mcpu))) { | 980 | if ((err = target_parse_triple(&target, target_string, mcpu))) { |
| 981 | if (err == ErrorUnknownArchitecture && target.arch != ZigLLVM_UnknownArch) { | 981 | fprintf(stderr, "invalid target: %s\n" |
| 982 | fprintf(stderr, "'%s' requires a sub-architecture. Try one of these:\n", | 982 | "See `%s targets` to display valid targets.\n", err_str(err), arg0); |
| 983 | target_arch_name(target.arch)); | 983 | return print_error_usage(arg0); |
| 984 | SubArchList sub_arch_list = target_subarch_list(target.arch); | | |
| 985 | size_t subarch_count = target_subarch_count(sub_arch_list); | | |
| 986 | for (size_t sub_i = 0; sub_i < subarch_count; sub_i += 1) { | | |
| 987 | ZigLLVM_SubArchType sub = target_subarch_enum(sub_arch_list, sub_i); | | |
| 988 | fprintf(stderr, " %s%s\n", target_arch_name(target.arch), target_subarch_name(sub)); | | |
| 989 | } | | |
| 990 | return print_error_usage(arg0); | | |
| 991 | } else { | | |
| 992 | fprintf(stderr, "invalid target: %s\n", err_str(err)); | | |
| 993 | return print_error_usage(arg0); | | |
| 994 | } | | |
| 995 | } | 984 | } |
| 996 | if (target_is_glibc(&target)) { | 985 | if (target_is_glibc(&target)) { |
| 997 | target.glibc_version = heap::c_allocator.create<ZigGLibCVersion>(); | 986 | target.glibc_version = heap::c_allocator.create<ZigGLibCVersion>(); |