Skip to content

Commit aec8216

Browse files
onur-ozkanKobzol
authored andcommitted
tell about STAGE0_MISSING_TARGETS for new targets
We just realized that the bootstrap target sanity check isn't documented anywhere, and it would be quite exhausting to learn this manually through a series of failing CI builds. Signed-off-by: onur-ozkan <work@onurozkan.dev>
1 parent 521f87f commit aec8216

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/building/new-target.md

+11
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,17 @@ adding `NEW_TARGET_OS` as `target_os`:
9494
+ (Some(Mode::Std), "target_os", Some(&["watchos", "NEW_TARGET_OS"])),
9595
```
9696

97+
To use this target in bootstrap, we need to explicitly add the target triple to the `STAGE0_MISSING_TARGETS`
98+
list in `src/bootstrap/src/core/sanity.rs`. This is necessary because the default compiler bootstrap uses does
99+
not recognize the new target we just added. Therefore, it should be added to `STAGE0_MISSING_TARGETS` so that the
100+
bootstrap is aware that this target is not yet supported by the stage0 compiler.
101+
102+
```diff
103+
const STAGE0_MISSING_TARGETS: &[&str] = &[
104+
+ "NEW_TARGET_TRIPLE"
105+
];
106+
```
107+
97108
## Patching crates
98109

99110
You may need to make changes to crates that the compiler depends on,

0 commit comments

Comments
 (0)