Commit 68c9337
committed
[bazel] Pin Windows target platform to gnullvm to fix proc-macro E0463
Windows CI pinned only --host_platform=//:local_windows_gnullvm, leaving the
target platform as Bazel's auto-detected x64_windows. That platform lacks the
@llvm//constraints/windows/abi:gnullvm and crt:msvcrt constraints, so the
Rust toolchain resolved for the target config was a different variant than the
one resolved for the exec (host) config.
The visible symptom: compiling crates like `scroll` (target config
x64_windows-fastbuild) referenced their proc-macro DLLs in the exec config
(local_windows_gnullvm-opt-exec). Because the two configs resolved mismatched
toolchains, the gnullvm proc-macro DLL (scroll_derive, time_macros) could not
be loaded by the target rustc and failed with E0463: can't find crate.
Pinning --platforms to //:local_windows_gnullvm as well puts the whole build
on a single gnullvm toolchain, exactly as the RBE config already pins both
--host_platform and --platforms. The extra abi/crt constraints only add to the
host-inherited platform, so non-Rust toolchains (Java, .NET, Python) resolve
unchanged.
Also removes the unused local_windows_msvc platform: the hermetic LLVM Windows
linker is hardwired to gnu-mode clang++ (-target x86_64-w64-windows-gnu)
regardless of the abi constraint, so an msvc host can never link rustc's
MSVC-style output. gnullvm is the only viable host, making that platform dead.1 parent f290959 commit 68c9337
3 files changed
Lines changed: 15 additions & 24 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | | - | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
98 | 107 | | |
99 | 108 | | |
100 | 109 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | 144 | | |
164 | 145 | | |
165 | 146 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
72 | 73 | | |
73 | 74 | | |
74 | 75 | | |
| |||
0 commit comments