From 7df38d94a1de6194dc6ecf474e62cff94fbadd22 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Fri, 24 Jan 2025 14:44:51 +0100 Subject: Recommend adding target spec first, then std support later Co-Authored-By: Jieyou Xu --- src/doc/rustc/src/target-tier-policy.md | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/doc/rustc') diff --git a/src/doc/rustc/src/target-tier-policy.md b/src/doc/rustc/src/target-tier-policy.md index 813c052d6db..a0acfdf0e4a 100644 --- a/src/doc/rustc/src/target-tier-policy.md +++ b/src/doc/rustc/src/target-tier-policy.md @@ -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 -- cgit 1.4.1-3-g733a5