Skip to content

Commit 7df38d9

Browse files
madsmtmjieyouxu
andcommitted
Recommend adding target spec first, then std support later
Co-Authored-By: Jieyou Xu <[email protected]>
1 parent 11de4b7 commit 7df38d9

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/doc/rustc/src/target-tier-policy.md

+7
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,13 @@ To propose addition of a new target, open a pull request on [`rust-lang/rust`]:
125125
See also the documentation in the `rustc-dev-guide` on [adding a new target to
126126
`rustc`][rustc_dev_guide_add_target].
127127

128+
Note that adding a new target that wants to support `std` would transitively
129+
require `cc` and `libc` support. However, these would like to know about the
130+
target from `rustc` as well. To break this cycle, you are strongly encouraged
131+
to add a _minimal_ `#![no_core]` target spec first to teach `rustc` about the
132+
target's existence, and add `std` support as a follow-up once you've added
133+
support for the target in `cc` and `libc`.
134+
128135
[tier3example]: https://github.com/rust-lang/rust/pull/94872
129136
[platform_template]: https://github.com/rust-lang/rust/blob/master/src/doc/rustc/src/platform-support/TEMPLATE.md
130137
[summary]: https://github.com/rust-lang/rust/blob/master/src/doc/rustc/src/SUMMARY.md

0 commit comments

Comments
 (0)