diff --git a/swift/internal/target_triples.bzl b/swift/internal/target_triples.bzl index 78d39c412..fcfae1203 100644 --- a/swift/internal/target_triples.bzl +++ b/swift/internal/target_triples.bzl @@ -130,6 +130,8 @@ def _parse(triple_string): it was present. This component may be `None`. """ components = triple_string.split("-") + if len(components) < 3: + fail("Invalid target triple: {}, this likely means you're using the wrong CC toolchain, make sure you include apple_support in your project".format(triple_string)) return _make( cpu = components[0], vendor = components[1],