Skip to content

Commit

Permalink
Recommend adding target spec first, then std support later
Browse files Browse the repository at this point in the history
Co-Authored-By: Jieyou Xu <[email protected]>
  • Loading branch information
madsmtm and jieyouxu committed Jan 31, 2025
1 parent 11de4b7 commit 7df38d9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/doc/rustc/src/target-tier-policy.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,13 @@ To propose addition of a new target, open a pull request on [`rust-lang/rust`]:
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
Expand Down

0 comments on commit 7df38d9

Please sign in to comment.