Skip to content

Commit

Permalink
Improve error for invalid triples
Browse files Browse the repository at this point in the history
  • Loading branch information
keith committed Jan 18, 2024
1 parent a0af0c0 commit b474d46
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions swift/internal/target_triples.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down

0 comments on commit b474d46

Please sign in to comment.