Skip to content

Commit

Permalink
clarify how whichever target is found first will take priority.
Browse files Browse the repository at this point in the history
  • Loading branch information
lolbinarycat committed Jul 28, 2024
1 parent 6fd7462 commit 65c2678
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/doc/rustc/src/targets/custom.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ When `rustc` is given an option `--target=TARGET` (where `TARGET` is any string)
1. if `TARGET` is the name of a built-in target, use that
2. if `TARGET` is a path to a file, read that file as a json target
3. otherwise, search the colon-seperated list of directories found
in the `RUST_TARGET_PATH` environment variable for a file named
`TARGET.json`.
in the `RUST_TARGET_PATH` environment variable from left to right
for a file named `TARGET.json`.

These steps are tried in order, so if there are multple potentially valid
interpretations for a target, whichever is found first will take priority.
If none of these methods find a target, an error is thrown.

0 comments on commit 65c2678

Please sign in to comment.