Commit 41bde5a
committed
Probe cargo for -Z json-target-spec support instead of guessing from the version
Both PolkaVM build paths compile against a `.json` target spec produced by
polkavm-linker and have to decide whether to pass cargo `-Z json-target-spec`:
newer cargo requires the flag, older cargo rejects it as unknown.
Both decided by comparing a version against 1.95 -- the fixture builder against
the *rustc* version, wasm-builder against the cargo version. Neither works. The
flag landed partway through the 1.95 cycle, so a nightly from early in that cycle
reports 1.95 from both binaries while its cargo does not know the flag yet:
rustc 1.95.0-nightly (474276961 2026-01-26)
cargo 1.95.0-nightly (efcd9f586 2026-01-23)
error: unknown `-Z` flag specified: json-target-spec
Ask cargo which unstable flags it accepts instead of inferring it from a version.1 parent 8574f19 commit 41bde5a
4 files changed
Lines changed: 69 additions & 24 deletions
File tree
- prdoc
- substrate
- frame/revive/fixtures/src
- utils/wasm-builder/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
201 | | - | |
202 | | - | |
203 | | - | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
204 | 206 | | |
205 | 207 | | |
206 | 208 | | |
207 | | - | |
208 | | - | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
209 | 216 | | |
210 | 217 | | |
211 | 218 | | |
212 | | - | |
| 219 | + | |
213 | 220 | | |
214 | 221 | | |
215 | 222 | | |
| |||
221 | 228 | | |
222 | 229 | | |
223 | 230 | | |
224 | | - | |
| 231 | + | |
225 | 232 | | |
226 | 233 | | |
| 234 | + | |
| 235 | + | |
227 | 236 | | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
232 | 246 | | |
233 | 247 | | |
234 | | - | |
| 248 | + | |
235 | 249 | | |
236 | 250 | | |
237 | 251 | | |
| |||
252 | 266 | | |
253 | 267 | | |
254 | 268 | | |
255 | | - | |
256 | | - | |
| 269 | + | |
| 270 | + | |
257 | 271 | | |
258 | 272 | | |
259 | 273 | | |
260 | 274 | | |
261 | | - | |
| 275 | + | |
262 | 276 | | |
263 | 277 | | |
264 | 278 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
334 | 334 | | |
335 | 335 | | |
336 | 336 | | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
337 | 352 | | |
338 | 353 | | |
339 | 354 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1023 | 1023 | | |
1024 | 1024 | | |
1025 | 1025 | | |
1026 | | - | |
1027 | | - | |
1028 | | - | |
1029 | | - | |
1030 | | - | |
1031 | | - | |
1032 | | - | |
1033 | | - | |
1034 | | - | |
| 1026 | + | |
| 1027 | + | |
| 1028 | + | |
1035 | 1029 | | |
1036 | 1030 | | |
1037 | 1031 | | |
| |||
0 commit comments