Skip to content

Commit 5f27c59

Browse files
committed
Fix CI: root toolchain pin and missing rust-src component
rust-toolchain.toml pinned stable-x86_64-pc-windows-gnu, a local Windows workaround that leaked into the repo root and broke toolchain resolution on Linux CI ("target tuple in channel name"). Dropped the host suffix to match the existing convention in kernel/rust-toolchain.toml and xtask/rust-toolchain.toml. kernel-tests and boot jobs invoke xtask, which pulls in the bootloader crate's build script — it compiles its own bare-metal boot-sector/stage helper binaries and needs rust-src to build core/alloc from source. Never surfaced locally because rust-src was already installed on the dev machine; a fresh CI runner hits it immediately.
1 parent ed00bbe commit 5f27c59

2 files changed

Lines changed: 18 additions & 3 deletions

File tree

.github/workflows/ci.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,12 @@ jobs:
7777
with:
7878
toolchain: nightly
7979
targets: x86_64-unknown-none
80-
components: llvm-tools
80+
# `rust-src`: the `bootloader` crate's build script (invoked via
81+
# `xtask` in this job) compiles its own boot-sector/stage-2/3/4
82+
# helper binaries for bare-metal targets, which needs to build
83+
# core/alloc from source — without this component that fails with
84+
# "does not exist, unable to build with the standard library".
85+
components: llvm-tools, rust-src
8186
- uses: Swatinem/rust-cache@v2
8287
with:
8388
workspaces: |
@@ -115,7 +120,12 @@ jobs:
115120
with:
116121
toolchain: nightly
117122
targets: x86_64-unknown-none
118-
components: llvm-tools
123+
# `rust-src`: the `bootloader` crate's build script (invoked via
124+
# `xtask` in this job) compiles its own boot-sector/stage-2/3/4
125+
# helper binaries for bare-metal targets, which needs to build
126+
# core/alloc from source — without this component that fails with
127+
# "does not exist, unable to build with the standard library".
128+
components: llvm-tools, rust-src
119129
- uses: Swatinem/rust-cache@v2
120130
with:
121131
workspaces: |

rust-toolchain.toml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
11
[toolchain]
2-
channel = "stable-x86_64-pc-windows-gnu"
2+
# No host suffix on purpose (CI runs on Linux) — same convention as
3+
# kernel/rust-toolchain.toml and xtask/rust-toolchain.toml. On a Windows dev
4+
# box with no MSVC Build Tools (link.exe), the host-default stable resolves
5+
# to -msvc and fails to link — invoke explicitly instead:
6+
# rustup run stable-x86_64-pc-windows-gnu cargo build
7+
channel = "stable"
38
components = ["clippy", "rustfmt"]

0 commit comments

Comments
 (0)