Skip to content

Commit

Permalink
tell about STAGE0_MISSING_TARGETS for new targets
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
onur-ozkan authored and Kobzol committed Jun 16, 2024
1 parent 521f87f commit aec8216
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/building/new-target.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,17 @@ adding `NEW_TARGET_OS` as `target_os`:
+ (Some(Mode::Std), "target_os", Some(&["watchos", "NEW_TARGET_OS"])),
```

To use this target in bootstrap, we need to explicitly add the target triple to the `STAGE0_MISSING_TARGETS`
list in `src/bootstrap/src/core/sanity.rs`. This is necessary because the default compiler bootstrap uses does
not recognize the new target we just added. Therefore, it should be added to `STAGE0_MISSING_TARGETS` so that the
bootstrap is aware that this target is not yet supported by the stage0 compiler.

```diff
const STAGE0_MISSING_TARGETS: &[&str] = &[
+ "NEW_TARGET_TRIPLE"
];
```

## Patching crates

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

0 comments on commit aec8216

Please sign in to comment.