authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-03-01 18:42:09-05:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-03-01 18:42:09-05:00
log764205ac13cc340ff6dcce74667c32dafe24e510
tree2368e2dfe647cfbf8f0f7e3b60326f64c6c21334
parentbed81089e108f24e33073445dd31d30af1232de6
signature Commit is signed but in an unrecognized format.

better error message for `-target windows` CLI

closes #1169

1 files changed, 3 insertions(+), 3 deletions(-)

src/target.cpp+3-3
...@@ -645,15 +645,15 @@ Error target_parse_triple(ZigTarget *target, const char *triple) {...@@ -645,15 +645,15 @@ Error target_parse_triple(ZigTarget *target, const char *triple) {
645 if (!opt_archsub.is_some)645 if (!opt_archsub.is_some)
646 return ErrorMissingArchitecture;646 return ErrorMissingArchitecture;
647647
648 if (!opt_os.is_some)
649 return ErrorMissingOperatingSystem;
650
651 if ((err = target_parse_archsub(&target->arch, &target->sub_arch,648 if ((err = target_parse_archsub(&target->arch, &target->sub_arch,
652 (char*)opt_archsub.value.ptr, opt_archsub.value.len)))649 (char*)opt_archsub.value.ptr, opt_archsub.value.len)))
653 {650 {
654 return err;651 return err;
655 }652 }
656653
654 if (!opt_os.is_some)
655 return ErrorMissingOperatingSystem;
656
657 if ((err = target_parse_os(&target->os, (char*)opt_os.value.ptr, opt_os.value.len))) {657 if ((err = target_parse_os(&target->os, (char*)opt_os.value.ptr, opt_os.value.len))) {
658 return err;658 return err;
659 }659 }