Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/doc/rustc-dev-guide/src/building/new-target.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,13 @@ These are a set of steps to add support for a new target. There are
numerous end states and paths to get there, so not all sections may be
relevant to your desired goal.

See also the associated documentation in the
[target tier policy][target_tier_policy_add].

<!-- toc -->

[target_tier_policy_add]: https://doc.rust-lang.org/rustc/target-tier-policy.html#adding-a-new-target

## Specifying a new LLVM

For very new targets, you may need to use a different fork of LLVM
Expand Down
11 changes: 11 additions & 0 deletions src/doc/rustc/src/target-tier-policy.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,12 +122,23 @@ To propose addition of a new target, open a pull request on [`rust-lang/rust`]:
r? compiler
```

See also the documentation in the `rustc-dev-guide` on [adding a new target to
`rustc`][rustc_dev_guide_add_target].

Note that adding a new target that wants to support `std` would transitively
require `cc` and `libc` support. However, these would like to know about the
target from `rustc` as well. To break this cycle, you are strongly encouraged
to add a _minimal_ `#![no_core]` target spec first to teach `rustc` about the
target's existence, and add `std` support as a follow-up once you've added
support for the target in `cc` and `libc`.

[tier3example]: https://github.com/rust-lang/rust/pull/94872
[platform_template]: https://github.com/rust-lang/rust/blob/master/src/doc/rustc/src/platform-support/TEMPLATE.md
[summary]: https://github.com/rust-lang/rust/blob/master/src/doc/rustc/src/SUMMARY.md
[platformsupport]: https://github.com/rust-lang/rust/blob/master/src/doc/rustc/src/platform-support.md
[rust_compiler_team]: https://www.rust-lang.org/governance/teams/compiler
[`rust-lang/rust`]: https://github.com/rust-lang/rust
[rustc_dev_guide_add_target]: https://rustc-dev-guide.rust-lang.org/building/new-target.html

## Tier 3 target policy

Expand Down
Loading