Skip to content

Commit 6e0bd3e

Browse files
committed
Retire outdated stage0 std remarks
1 parent a0e483a commit 6e0bd3e

File tree

1 file changed

+6
-26
lines changed

1 file changed

+6
-26
lines changed

src/building/new-target.md

Lines changed: 6 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -80,32 +80,12 @@ will then add a corresponding file for your new target containing a
8080

8181
Look for existing targets to use as examples.
8282

83-
After adding your target to the `rustc_target` crate you may want to add
84-
`core`, `std`, ... with support for your new target. In that case you will
85-
probably need access to some `target_*` cfg. Unfortunately when building with
86-
stage0 (a precompiled compiler), you'll get an error that the target cfg is
87-
unexpected because stage0 doesn't know about the new target specification and
88-
we pass `--check-cfg` in order to tell it to check.
89-
90-
To fix the errors you will need to manually add the unexpected value to the
91-
different `Cargo.toml` in `library/{std,alloc,core}/Cargo.toml`. Here is an
92-
example for adding `NEW_TARGET_ARCH` as `target_arch`:
93-
94-
*`library/std/Cargo.toml`*:
95-
```diff
96-
[lints.rust.unexpected_cfgs]
97-
level = "warn"
98-
check-cfg = [
99-
'cfg(bootstrap)',
100-
- 'cfg(target_arch, values("xtensa"))',
101-
+ # #[cfg(bootstrap)] NEW_TARGET_ARCH
102-
+ 'cfg(target_arch, values("xtensa", "NEW_TARGET_ARCH"))',
103-
```
104-
105-
To use this target in bootstrap, we need to explicitly add the target triple to the `STAGE0_MISSING_TARGETS`
106-
list in `src/bootstrap/src/core/sanity.rs`. This is necessary because the default compiler bootstrap uses does
107-
not recognize the new target we just added. Therefore, it should be added to `STAGE0_MISSING_TARGETS` so that the
108-
bootstrap is aware that this target is not yet supported by the stage0 compiler.
83+
To use this target in bootstrap, we need to explicitly add the target triple to
84+
the `STAGE0_MISSING_TARGETS` list in `src/bootstrap/src/core/sanity.rs`. This
85+
is necessary because the default bootstrap compiler (typically a beta compiler)
86+
does not recognize the new target we just added. Therefore, it should be added to
87+
`STAGE0_MISSING_TARGETS` so that the bootstrap is aware that this target is not
88+
yet supported by the stage0 compiler.
10989

11090
```diff
11191
const STAGE0_MISSING_TARGETS: &[&str] = &[

0 commit comments

Comments
 (0)