From c425700a2a8cc7d5ad40ed173f90f1ad8c852ef1 Mon Sep 17 00:00:00 2001 From: nhtyy Date: Thu, 27 Feb 2025 10:30:57 -0800 Subject: [PATCH] chore: cc-rs MUST be forked for new targets --- src/building/new-target.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/building/new-target.md b/src/building/new-target.md index cd215277e..b96c9502c 100644 --- a/src/building/new-target.md +++ b/src/building/new-target.md @@ -119,7 +119,12 @@ const STAGE0_MISSING_TARGETS: &[&str] = &[ ## Patching crates You may need to make changes to crates that the compiler depends on, -such as [`libc`][] or [`cc`][]. If so, you can use Cargo's +such as [`libc`][] or [`cc`][]. + +For instance, [`cc`][] only supports a hardcoded list of targets, if your target is not known to [`cc`][], +you will need to maintain a fork of [`cc`][] until it lands in nightly and the auto-generated list has been updated. + +If so, you can use Cargo's [`[patch]`][patch] ability. For example, if you want to use an unreleased version of `libc`, you can add it to the top-level `Cargo.toml` file: