rust
rust copied to clipboard
show linker output even if the linker succeeds
- show stderr by default
- show stdout if
--verboseis passed - remove both from RUSTC_LOG
- hide the linker cli args unless
--verboseis passed
fixes https://github.com/rust-lang/rust/issues/83436. fixes https://github.com/rust-lang/rust/issues/38206. fixes https://github.com/rust-lang/rust/issues/109979. helps with https://github.com/rust-lang/rust/issues/46998. cc https://rust-lang.zulipchat.com/#narrow/stream/233931-t-compiler.2Fmajor-changes/topic/uplift.20some.20-Zverbose.20calls.20and.20rename.20to.E2.80.A6.20compiler-team.23706/near/408986134
this is based on https://github.com/rust-lang/rust/pull/119129 for convenience so i didn't have to duplicate the changes around saving --verbose in https://github.com/rust-lang/rust/pull/119129/commits/cb6d033316bdc2a1c5c1c0e04b297fbbb81eafca#diff-7a49efa20548d6806dbe1c66dd4dc445fda18fcbbf1709520cadecc4841aae12
r? @bjorn3
rustc_macros::diagnostics was changed
cc @davidtwco, @compiler-errors, @TaKO8Ki
hmm actually this is a slight expansion of scope but @bjorn3 how would you feel about not printing the giant list of linker arguments unless someone passes --verbose (https://github.com/rust-lang/rust/issues/109979)
The job x86_64-gnu-llvm-16 failed! Check out the build log: (web) (plain)
Click to see the possible cause of the failure (guessed by this bot)
Built container sha256:9c3c93a371e5aed5c18185b24f130d95d5140dbd72a9b325e7b6b49e521a4faa
Looks like docker image is the same as before, not uploading
https://ci-caches.rust-lang.org/docker/7ebc15c01a233894034d277c8cce4e949f4e7791f66b4727c8fb6e058a0b8171d6152e1441d677cef0653843ceeee469c097b8699b2bb74249e674f6aa1a8813
sha256:9c3c93a371e5aed5c18185b24f130d95d5140dbd72a9b325e7b6b49e521a4faa
Setting extra environment values for docker: --env ENABLE_GCC_CODEGEN=1 --env GCC_EXEC_PREFIX=/usr/lib/gcc/
[CI_JOB_NAME=x86_64-gnu-llvm-16]
##[group]Clock drift check
local time: Sun Dec 24 23:48:40 UTC 2023
network time: Sun, 24 Dec 2023 23:48:40 GMT
network time: Sun, 24 Dec 2023 23:48:40 GMT
##[endgroup]
sccache: Starting the server...
##[group]Configure the build
configure: processing command line
configure:
configure: build.configure-args := ['--build=x86_64-unknown-linux-gnu', '--llvm-root=/usr/lib/llvm-16', '--enable-llvm-link-shared', '--set', 'rust.thin-lto-import-instr-limit=10', '--enable-verbose-configure', '--enable-sccache', '--disable-manage-submodules', '--enable-locked-deps', '--enable-cargo-native-static', '--set', 'rust.codegen-units-std=1', '--set', 'dist.compression-profile=balanced', '--dist-compression-formats=xz', '--disable-dist-src', '--release-channel=nightly', '--enable-debug-assertions', '--enable-overflow-checks', '--enable-llvm-assertions', '--set', 'rust.verify-llvm-ir', '--set', 'rust.codegen-backends=llvm,cranelift,gcc', '--set', 'llvm.static-libstdcpp', '--enable-missing-tools', '--enable-new-symbol-mangling']
configure: target.x86_64-unknown-linux-gnu.llvm-config := /usr/lib/llvm-16/bin/llvm-config
configure: llvm.link-shared := True
configure: rust.thin-lto-import-instr-limit := 10
configure: rust.codegen-units-std := 1
---
Uplifting rustc (stage1 -> stage3)
##[group]Testing stage2 compiletest suite=ui-fulldeps mode=ui (x86_64-unknown-linux-gnu)
running 41 tests
................F.....F..F...............
failures:
---- [ui] tests/ui-fulldeps/session-diagnostic/enforce_slug_naming.rs stdout ----
diff of stderr:
diff of stderr:
- error: diagnostic slug and crate name do not match
+ error: derive(Diagnostic): diagnostic slug and crate name do not match
3 |
4 LL | #[diag(compiletest_example, code = "E0123")]
---
status: exit status: 1
command: CARGO_CRATE_NAME="rustc_dummy" RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui-fulldeps/session-diagnostic/enforce_slug_naming.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui-fulldeps/session-diagnostic/enforce_slug_naming" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui-fulldeps/session-diagnostic/enforce_slug_naming/auxiliary"
stdout: none
--- stderr -------------------------------
error: derive(Diagnostic): diagnostic slug and crate name do not match
|
LL | #[diag(compiletest_example, code = "E0123")]
| ^^^^^^^^^^^^^^^^^^^
|
---
---- [ui] tests/ui-fulldeps/session-diagnostic/subdiagnostic-derive.rs stdout ----
diff of stderr:
- error: label without `#[primary_span]` field
+ error: derive(Diagnostic): label without `#[primary_span]` field
3 |
3 |
4 LL | / #[label(no_crate_example)]
8 LL | | }
9 | |_^
10
10
- error: diagnostic slug must be first argument of a `#[label(...)]` attribute
+ error: derive(Diagnostic): diagnostic slug must be first argument of a `#[label(...)]` attribute
13 |
14 LL | #[label]
15 | ^^^^^^^^
15 | ^^^^^^^^
16
- error: `#[foo]` is not a valid attribute
+ error: derive(Diagnostic): `#[foo]` is not a valid attribute
19 |
20 LL | #[foo]
21 | ^^^^^^
21 | ^^^^^^
22
- error: `#[label = ...]` is not a valid attribute
+ error: derive(Diagnostic): `#[label = ...]` is not a valid attribute
25 |
25 |
26 LL | #[label = "..."]
27 | ^^^^^^^^^^^^^^^^
28
28
- error: only `no_span` is a valid nested attribute
+ error: derive(Diagnostic): only `no_span` is a valid nested attribute
31 |
31 |
32 LL | #[label(bug = "...")]
33 | ^^^
34
34
- error: diagnostic slug must be first argument of a `#[label(...)]` attribute
+ error: derive(Diagnostic): diagnostic slug must be first argument of a `#[label(...)]` attribute
37 |
37 |
38 LL | #[label(bug = "...")]
39 | ^^^^^^^^^^^^^^^^^^^^^
40
40
- error: only `no_span` is a valid nested attribute
+ error: derive(Diagnostic): only `no_span` is a valid nested attribute
43 |
43 |
44 LL | #[label(slug = 4)]
45 | ^^^^
46
46
- error: diagnostic slug must be first argument of a `#[label(...)]` attribute
+ error: derive(Diagnostic): diagnostic slug must be first argument of a `#[label(...)]` attribute
49 |
49 |
50 LL | #[label(slug = 4)]
51 | ^^^^^^^^^^^^^^^^^^
52
52
- error: only `no_span` is a valid nested attribute
+ error: derive(Diagnostic): only `no_span` is a valid nested attribute
55 |
55 |
56 LL | #[label(slug("..."))]
57 | ^^^^
58
58
- error: diagnostic slug must be first argument of a `#[label(...)]` attribute
+ error: derive(Diagnostic): diagnostic slug must be first argument of a `#[label(...)]` attribute
61 |
61 |
62 LL | #[label(slug("..."))]
63 | ^^^^^^^^^^^^^^^^^^^^^
64
64
- error: diagnostic slug must be first argument of a `#[label(...)]` attribute
+ error: derive(Diagnostic): diagnostic slug must be first argument of a `#[label(...)]` attribute
67 |
67 |
68 LL | #[label()]
69 | ^^^^^^^^^^
70
70
- error: only `no_span` is a valid nested attribute
+ error: derive(Diagnostic): only `no_span` is a valid nested attribute
73 |
73 |
74 LL | #[label(no_crate_example, code = "...")]
75 | ^^^^
76
76
- error: only `no_span` is a valid nested attribute
+ error: derive(Diagnostic): only `no_span` is a valid nested attribute
79 |
79 |
80 LL | #[label(no_crate_example, applicability = "machine-applicable")]
81 | ^^^^^^^^^^^^^
82
- error: unsupported type attribute for subdiagnostic enum
- error: unsupported type attribute for subdiagnostic enum
+ error: derive(Diagnostic): unsupported type attribute for subdiagnostic enum
85 |
86 LL | #[foo]
87 | ^^^^^^
87 | ^^^^^^
88
- error: `#[bar]` is not a valid attribute
+ error: derive(Diagnostic): `#[bar]` is not a valid attribute
91 |
92 LL | #[bar]
93 | ^^^^^^
93 | ^^^^^^
94
- error: `#[bar = ...]` is not a valid attribute
+ error: derive(Diagnostic): `#[bar = ...]` is not a valid attribute
97 |
97 |
98 LL | #[bar = "..."]
99 | ^^^^^^^^^^^^^^
100
100
- error: `#[bar = ...]` is not a valid attribute
+ error: derive(Diagnostic): `#[bar = ...]` is not a valid attribute
103 |
103 |
104 LL | #[bar = 4]
105 | ^^^^^^^^^^
106
106
- error: `#[bar(...)]` is not a valid attribute
+ error: derive(Diagnostic): `#[bar(...)]` is not a valid attribute
109 |
109 |
110 LL | #[bar("...")]
111 | ^^^^^^^^^^^^^
112
112
- error: only `no_span` is a valid nested attribute
+ error: derive(Diagnostic): only `no_span` is a valid nested attribute
115 |
115 |
116 LL | #[label(code = "...")]
117 | ^^^^
118
118
- error: diagnostic slug must be first argument of a `#[label(...)]` attribute
+ error: derive(Diagnostic): diagnostic slug must be first argument of a `#[label(...)]` attribute
121 |
121 |
122 LL | #[label(code = "...")]
123 | ^^^^^^^^^^^^^^^^^^^^^^
124
124
- error: the `#[primary_span]` attribute can only be applied to fields of type `Span` or `MultiSpan`
+ error: derive(Diagnostic): the `#[primary_span]` attribute can only be applied to fields of type `Span` or `MultiSpan`
127 |
127 |
128 LL | #[primary_span]
129 | ^^^^^^^^^^^^^^^
130
130
- error: label without `#[primary_span]` field
+ error: derive(Diagnostic): label without `#[primary_span]` field
133 |
133 |
134 LL | / #[label(no_crate_example)]
140 LL | | }
141 | |_^
142
142
- error: `#[applicability]` is only valid on suggestions
+ error: derive(Diagnostic): `#[applicability]` is only valid on suggestions
145 |
146 LL | #[applicability]
147 | ^^^^^^^^^^^^^^^^
147 | ^^^^^^^^^^^^^^^^
148
- error: `#[bar]` is not a valid attribute
+ error: derive(Diagnostic): `#[bar]` is not a valid attribute
151 |
152 LL | #[bar]
154 |
154 |
155 = help: only `primary_span`, `applicability` and `skip_arg` are valid field attributes
156
- error: `#[bar = ...]` is not a valid attribute
+ error: derive(Diagnostic): `#[bar = ...]` is not a valid attribute
159 |
159 |
160 LL | #[bar = "..."]
161 | ^^^^^^^^^^^^^^
162
162
- error: `#[bar(...)]` is not a valid attribute
+ error: derive(Diagnostic): `#[bar(...)]` is not a valid attribute
165 |
165 |
166 LL | #[bar("...")]
168 |
168 |
169 = help: only `primary_span`, `applicability` and `skip_arg` are valid field attributes
- error: a diagnostic slug must be the first argument to the attribute
- error: a diagnostic slug must be the first argument to the attribute
+ error: derive(Diagnostic): a diagnostic slug must be the first argument to the attribute
173 |
173 |
174 LL | #[label(no_crate_example, no_crate::example)]
175 | ^
176
- error: specified multiple times
- error: specified multiple times
+ error: derive(Diagnostic): specified multiple times
179 |
179 |
180 LL | #[primary_span]
186 LL | #[primary_span]
188
- error: subdiagnostic kind not specified
- error: subdiagnostic kind not specified
+ error: derive(Diagnostic): subdiagnostic kind not specified
191 |
192 LL | struct AG {
193 | ^^
193 | ^^
194
- error: specified multiple times
+ error: derive(Diagnostic): specified multiple times
197 |
197 |
198 LL | #[suggestion(no_crate_example, code = "...", code = "...")]
204 LL | #[suggestion(no_crate_example, code = "...", code = "...")]
206
- error: specified multiple times
- error: specified multiple times
+ error: derive(Diagnostic): specified multiple times
209 |
210 LL | #[applicability]
216 LL | #[applicability]
216 LL | #[applicability]
217 | ^^^^^^^^^^^^^^^^
218
- error: the `#[applicability]` attribute can only be applied to fields of type `Applicability`
+ error: derive(Diagnostic): the `#[applicability]` attribute can only be applied to fields of type `Applicability`
221 |
222 LL | #[applicability]
223 | ^^^^^^^^^^^^^^^^
223 | ^^^^^^^^^^^^^^^^
224
- error: suggestion without `code = "..."`
+ error: derive(Diagnostic): suggestion without `code = "..."`
227 |
227 |
228 LL | #[suggestion(no_crate_example)]
229 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
230
- error: invalid applicability
- error: invalid applicability
+ error: derive(Diagnostic): invalid applicability
233 |
233 |
234 LL | #[suggestion(no_crate_example, code = "...", applicability = "foo")]
235 | ^^^^^
236
236
- error: suggestion without `#[primary_span]` field
+ error: derive(Diagnostic): suggestion without `#[primary_span]` field
239 |
239 |
240 LL | / #[suggestion(no_crate_example, code = "...")]
244 LL | | }
245 | |_^
246
- error: unsupported type attribute for subdiagnostic enum
- error: unsupported type attribute for subdiagnostic enum
+ error: derive(Diagnostic): unsupported type attribute for subdiagnostic enum
249 |
250 LL | #[label]
251 | ^^^^^^^^
251 | ^^^^^^^^
252
- error: `var` doesn't refer to a field on this type
+ error: derive(Diagnostic): `var` doesn't refer to a field on this type
255 |
255 |
256 LL | #[suggestion(no_crate_example, code = "{var}", applicability = "machine-applicable")]
257 | ^^^^^^^
258
258
- error: `var` doesn't refer to a field on this type
+ error: derive(Diagnostic): `var` doesn't refer to a field on this type
261 |
261 |
262 LL | #[suggestion(no_crate_example, code = "{var}", applicability = "machine-applicable")]
263 | ^^^^^^^
264
264
- error: `#[suggestion_part]` is not a valid attribute
+ error: derive(Diagnostic): `#[suggestion_part]` is not a valid attribute
267 |
268 LL | #[suggestion_part]
270 |
270 |
271 = help: `#[suggestion_part(...)]` is only valid in multipart suggestions, use `#[primary_span]` instead
272
- error: `#[suggestion_part(...)]` is not a valid attribute
+ error: derive(Diagnostic): `#[suggestion_part(...)]` is not a valid attribute
275 |
275 |
276 LL | #[suggestion_part(code = "...")]
278 |
278 |
279 = help: `#[suggestion_part(...)]` is only valid in multipart suggestions
280
- error: suggestion without `#[primary_span]` field
+ error: derive(Diagnostic): suggestion without `#[primary_span]` field
283 |
283 |
284 LL | / #[suggestion(no_crate_example, code = "...")]
290 LL | | }
291 | |_^
292
- error: invalid nested attribute
- error: invalid nested attribute
+ error: derive(Diagnostic): invalid nested attribute
295 |
295 |
296 LL | #[multipart_suggestion(no_crate_example, code = "...", applicability = "machine-applicable")]
298 |
298 |
299 = help: only `no_span`, `style` and `applicability` are valid nested attributes
300
- error: multipart suggestion without any `#[suggestion_part(...)]` fields
+ error: derive(Diagnostic): multipart suggestion without any `#[suggestion_part(...)]` fields
303 |
303 |
304 LL | / #[multipart_suggestion(no_crate_example, code = "...", applicability = "machine-applicable")]
309 LL | | }
310 | |_^
311
311
- error: `#[suggestion_part(...)]` attribute without `code = "..."`
+ error: derive(Diagnostic): `#[suggestion_part(...)]` attribute without `code = "..."`
314 |
315 LL | #[suggestion_part]
316 | ^^^^^^^^^^^^^^^^^^
316 | ^^^^^^^^^^^^^^^^^^
317
- error: `#[suggestion_part(...)]` attribute without `code = "..."`
+ error: derive(Diagnostic): `#[suggestion_part(...)]` attribute without `code = "..."`
320 |
320 |
321 LL | #[suggestion_part()]
322 | ^^^^^^^^^^^^^^^^^^^^
323
323
- error: `#[primary_span]` is not a valid attribute
+ error: derive(Diagnostic): `#[primary_span]` is not a valid attribute
326 |
326 |
327 LL | #[primary_span]
329 |
329 |
330 = help: multipart suggestions use one or more `#[suggestion_part]`s rather than one `#[primary_span]`
331
- error: multipart suggestion without any `#[suggestion_part(...)]` fields
+ error: derive(Diagnostic): multipart suggestion without any `#[suggestion_part(...)]` fields
334 |
334 |
335 LL | / #[multipart_suggestion(no_crate_example)]
341 LL | | }
342 | |_^
343
343
- error: `#[suggestion_part(...)]` attribute without `code = "..."`
+ error: derive(Diagnostic): `#[suggestion_part(...)]` attribute without `code = "..."`
346 |
347 LL | #[suggestion_part]
348 | ^^^^^^^^^^^^^^^^^^
348 | ^^^^^^^^^^^^^^^^^^
349
- error: `#[suggestion_part(...)]` attribute without `code = "..."`
+ error: derive(Diagnostic): `#[suggestion_part(...)]` attribute without `code = "..."`
352 |
352 |
353 LL | #[suggestion_part()]
354 | ^^^^^^^^^^^^^^^^^^^^
355
355
- error: `code` is the only valid nested attribute
+ error: derive(Diagnostic): `code` is the only valid nested attribute
358 |
358 |
359 LL | #[suggestion_part(foo = "bar")]
360 | ^^^
361
361
- error: the `#[suggestion_part(...)]` attribute can only be applied to fields of type `Span` or `MultiSpan`
+ error: derive(Diagnostic): the `#[suggestion_part(...)]` attribute can only be applied to fields of type `Span` or `MultiSpan`
364 |
364 |
365 LL | #[suggestion_part(code = "...")]
366 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
367
367
- error: the `#[suggestion_part(...)]` attribute can only be applied to fields of type `Span` or `MultiSpan`
+ error: derive(Diagnostic): the `#[suggestion_part(...)]` attribute can only be applied to fields of type `Span` or `MultiSpan`
370 |
370 |
371 LL | #[suggestion_part()]
372 | ^^^^^^^^^^^^^^^^^^^^
373
- error: specified multiple times
- error: specified multiple times
+ error: derive(Diagnostic): specified multiple times
376 |
Build completed unsuccessfully in 0:14:02
Build completed unsuccessfully in 0:14:02
377 LL | #[suggestion_part(code = "...", code = ",,,")]
383 LL | #[suggestion_part(code = "...", code = ",,,")]
385
385
- error: `#[applicability]` has no effect if all `#[suggestion]`/`#[multipart_suggestion]` attributes have a static `applicability = "..."`
+ error: derive(Diagnostic): `#[applicability]` has no effect if all `#[suggestion]`/`#[multipart_suggestion]` attributes have a static `applicability = "..."`
388 |
389 LL | #[applicability]
390 | ^^^^^^^^^^^^^^^^
390 | ^^^^^^^^^^^^^^^^
391
- error: expected exactly one string literal for `code = ...`
+ error: derive(Diagnostic): expected exactly one string literal for `code = ...`
394 |
394 |
395 LL | #[suggestion_part(code("foo"))]
396 | ^
397
- error: expected exactly one string literal for `code = ...`
- error: expected exactly one string literal for `code = ...`
+ error: derive(Diagnostic): expected exactly one string literal for `code = ...`
400 |
400 |
401 LL | #[suggestion_part(code("foo", "bar"))]
402 | ^
403
- error: expected exactly one string literal for `code = ...`
- error: expected exactly one string literal for `code = ...`
+ error: derive(Diagnostic): expected exactly one string literal for `code = ...`
406 |
406 |
407 LL | #[suggestion_part(code(3))]
408 | ^
409
- error: expected exactly one string literal for `code = ...`
- error: expected exactly one string literal for `code = ...`
+ error: derive(Diagnostic): expected exactly one string literal for `code = ...`
412 |
412 |
413 LL | #[suggestion_part(code())]
414 | ^
415
- error: specified multiple times
- error: specified multiple times
+ error: derive(Diagnostic): specified multiple times
418 |
418 |
419 LL | #[suggestion(no_crate_example, code = "", style = "hidden", style = "normal")]
425 LL | #[suggestion(no_crate_example, code = "", style = "hidden", style = "normal")]
427
427
- error: `#[suggestion_hidden(...)]` is not a valid attribute
+ error: derive(Diagnostic): `#[suggestion_hidden(...)]` is not a valid attribute
430 |
430 |
431 LL | #[suggestion_hidden(no_crate_example, code = "")]
433 |
---
error: cannot find attribute `bar` in this scope
##[error] --> /checkout/tests/ui-fulldeps/session-diagnostic/subdiagnostic-derive.rs:189:7
|
LL | #[bar = "..."]
error: cannot find attribute `bar` in this scope
##[error] --> /checkout/tests/ui-fulldeps/session-diagnostic/subdiagnostic-derive.rs:201:7
|
|
LL | #[bar = 4]
error: cannot find attribute `bar` in this scope
##[error] --> /checkout/tests/ui-fulldeps/session-diagnostic/subdiagnostic-derive.rs:213:7
|
|
LL | #[bar("...")]
error: cannot find attribute `bar` in this scope
##[error] --> /checkout/tests/ui-fulldeps/session-diagnostic/subdiagnostic-derive.rs:274:7
|
|
LL | #[bar]
| ^^^
error: cannot find attribute `bar` in this scope
##[error] --> /checkout/tests/ui-fulldeps/session-diagnostic/subdiagnostic-derive.rs:285:7
|
LL | #[bar = "..."]
error: cannot find attribute `bar` in this scope
##[error] --> /checkout/tests/ui-fulldeps/session-diagnostic/subdiagnostic-derive.rs:296:7
|
|
LL | #[bar("...")]
error[E0425]: cannot find value `slug` in module `crate::fluent_generated`
|
|
LL | #[label(slug)]
| ^^^^ not found in `crate::fluent_generated`
error[E0425]: cannot find value `__code_29` in this scope
|
LL | #[derive(Subdiagnostic)]
| ^^^^^^^^^^^^^ not found in this scope
|
---
---- [ui] tests/ui-fulldeps/session-diagnostic/diagnostic-derive.rs stdout ----
diff of stderr:
- error: unsupported type attribute for diagnostic derive enum
+ error: derive(Diagnostic): unsupported type attribute for diagnostic derive enum
3 |
4 LL | #[diag(no_crate_example, code = "E0123")]
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6
- error: diagnostic slug not specified
+ error: derive(Diagnostic): diagnostic slug not specified
9 |
10 LL | Foo,
12 |
12 |
13 = help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
- error: diagnostic slug not specified
- error: diagnostic slug not specified
+ error: derive(Diagnostic): diagnostic slug not specified
17 |
18 LL | Bar,
20 |
20 |
21 = help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
22
- error: `#[nonsense(...)]` is not a valid attribute
+ error: derive(Diagnostic): `#[nonsense(...)]` is not a valid attribute
25 |
25 |
26 LL | #[nonsense(no_crate_example, code = "E0123")]
27 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
28
- error: diagnostic slug not specified
- error: diagnostic slug not specified
+ error: derive(Diagnostic): diagnostic slug not specified
31 |
31 |
32 LL | / #[nonsense(no_crate_example, code = "E0123")]
38 |
38 |
39 = help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
- error: diagnostic slug not specified
- error: diagnostic slug not specified
+ error: derive(Diagnostic): diagnostic slug not specified
43 |
44 LL | / #[diag("E0123")]
48 |
48 |
49 = help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
- error: diagnostic slug must be the first argument
- error: diagnostic slug must be the first argument
+ error: derive(Diagnostic): diagnostic slug must be the first argument
53 |
53 |
54 LL | #[diag(nonsense("foo"), code = "E0123", slug = "foo")]
55 | ^
56
- error: diagnostic slug not specified
- error: diagnostic slug not specified
+ error: derive(Diagnostic): diagnostic slug not specified
59 |
59 |
60 LL | / #[diag(nonsense("foo"), code = "E0123", slug = "foo")]
65 |
65 |
66 = help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
- error: unknown argument
- error: unknown argument
+ error: derive(Diagnostic): unknown argument
70 |
70 |
71 LL | #[diag(nonsense = "...", code = "E0123", slug = "foo")]
73 |
73 |
74 = note: only the `code` parameter is valid after the slug
- error: diagnostic slug not specified
- error: diagnostic slug not specified
+ error: derive(Diagnostic): diagnostic slug not specified
78 |
78 |
79 LL | / #[diag(nonsense = "...", code = "E0123", slug = "foo")]
84 |
84 |
85 = help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
- error: unknown argument
- error: unknown argument
+ error: derive(Diagnostic): unknown argument
89 |
89 |
90 LL | #[diag(nonsense = 4, code = "E0123", slug = "foo")]
92 |
92 |
93 = note: only the `code` parameter is valid after the slug
- error: diagnostic slug not specified
- error: diagnostic slug not specified
+ error: derive(Diagnostic): diagnostic slug not specified
97 |
97 |
98 LL | / #[diag(nonsense = 4, code = "E0123", slug = "foo")]
103 |
103 |
104 = help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
- error: unknown argument
- error: unknown argument
+ error: derive(Diagnostic): unknown argument
108 |
108 |
109 LL | #[diag(no_crate_example, code = "E0123", slug = "foo")]
111 |
111 |
112 = note: only the `code` parameter is valid after the slug
113
- error: `#[suggestion = ...]` is not a valid attribute
+ error: derive(Diagnostic): `#[suggestion = ...]` is not a valid attribute
116 |
116 |
117 LL | #[suggestion = "bar"]
118 | ^^^^^^^^^^^^^^^^^^^^^
119
- error: specified multiple times
- error: specified multiple times
+ error: derive(Diagnostic): specified multiple times
122 |
123 LL | #[diag(no_crate_example, code = "E0456")]
129 LL | #[diag(no_crate_example, code = "E0123")]
129 LL | #[diag(no_crate_example, code = "E0123")]
130 | ^^^^^^^^^^^^^^^^
131
- error: specified multiple times
+ error: derive(Diagnostic): specified multiple times
134 |
135 LL | #[diag(no_crate_example, code = "E0456")]
141 LL | #[diag(no_crate_example, code = "E0123")]
141 LL | #[diag(no_crate_example, code = "E0123")]
142 | ^^^^
143
- error: specified multiple times
+ error: derive(Diagnostic): specified multiple times
146 |
146 |
147 LL | #[diag(no_crate_example, code = "E0456", code = "E0457")]
153 LL | #[diag(no_crate_example, code = "E0456", code = "E0457")]
155
- error: diagnostic slug must be the first argument
- error: diagnostic slug must be the first argument
+ error: derive(Diagnostic): diagnostic slug must be the first argument
158 |
159 LL | #[diag(no_crate_example, no_crate::example, code = "E0456")]
160 | ^
160 | ^
161
- error: diagnostic slug not specified
+ error: derive(Diagnostic): diagnostic slug not specified
164 |
164 |
165 LL | struct KindNotProvided {}
167 |
167 |
168 = help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
- error: diagnostic slug not specified
- error: diagnostic slug not specified
+ error: derive(Diagnostic): diagnostic slug not specified
172 |
173 LL | / #[diag(code = "E0456")]
177 |
177 |
178 = help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
179
- error: the `#[primary_span]` attribute can only be applied to fields of type `Span` or `MultiSpan`
+ error: derive(Diagnostic): the `#[primary_span]` attribute can only be applied to fields of type `Span` or `MultiSpan`
182 |
182 |
183 LL | #[primary_span]
184 | ^^^^^^^^^^^^^^^
185
185
- error: `#[nonsense]` is not a valid attribute
+ error: derive(Diagnostic): `#[nonsense]` is not a valid attribute
188 |
188 |
189 LL | #[nonsense]
190 | ^^^^^^^^^^^
191
191
- error: the `#[label(...)]` attribute can only be applied to fields of type `Span` or `MultiSpan`
+ error: derive(Diagnostic): the `#[label(...)]` attribute can only be applied to fields of type `Span` or `MultiSpan`
194 |
194 |
195 LL | #[label(no_crate_label)]
196 | ^^^^^^^^^^^^^^^^^^^^^^^^
197
- error: `name` doesn't refer to a field on this type
- error: `name` doesn't refer to a field on this type
+ error: derive(Diagnostic): `name` doesn't refer to a field on this type
200 |
200 |
201 LL | #[suggestion(no_crate_suggestion, code = "{name}")]
219 = note: if you intended to print `}`, you can escape it using `}}`
220 = note: this error originates in the derive macro `Diagnostic` (in Nightly builds, run with -Z macro-backtrace for more info)
221
- error: the `#[label(...)]` attribute can only be applied to fields of type `Span` or `MultiSpan`
+ error: derive(Diagnostic): the `#[label(...)]` attribute can only be applied to fields of type `Span` or `MultiSpan`
224 |
224 |
225 LL | #[label(no_crate_label)]
226 | ^^^^^^^^^^^^^^^^^^^^^^^^
227
- error: suggestion without `code = "..."`
- error: suggestion without `code = "..."`
+ error: derive(Diagnostic): suggestion without `code = "..."`
230 |
230 |
231 LL | #[suggestion(no_crate_suggestion)]
232 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
233
- error: invalid nested attribute
- error: invalid nested attribute
+ error: derive(Diagnostic): invalid nested attribute
236 |
236 |
237 LL | #[suggestion(nonsense = "bar")]
239 |
239 |
240 = help: only `no_span`, `style`, `code` and `applicability` are valid nested attributes
- error: suggestion without `code = "..."`
- error: suggestion without `code = "..."`
+ error: derive(Diagnostic): suggestion without `code = "..."`
244 |
244 |
245 LL | #[suggestion(nonsense = "bar")]
246 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
247
- error: invalid nested attribute
- error: invalid nested attribute
+ error: derive(Diagnostic): invalid nested attribute
250 |
250 |
251 LL | #[suggestion(msg = "bar")]
253 |
253 |
254 = help: only `no_span`, `style`, `code` and `applicability` are valid nested attributes
- error: suggestion without `code = "..."`
- error: suggestion without `code = "..."`
+ error: derive(Diagnostic): suggestion without `code = "..."`
258 |
258 |
259 LL | #[suggestion(msg = "bar")]
260 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
261
- error: wrong field type for suggestion
- error: wrong field type for suggestion
+ error: derive(Diagnostic): wrong field type for suggestion
264 |
264 |
265 LL | / #[suggestion(no_crate_suggestion, code = "This is suggested code")]
269 |
269 |
270 = help: `#[suggestion(...)]` should be applied to fields of type `Span` or `(Span, Applicability)`
- error: specified multiple times
- error: specified multiple times
+ error: derive(Diagnostic): specified multiple times
274 |
274 |
275 LL | suggestion: (Span, Span, Applicability),
281 LL | suggestion: (Span, Span, Applicability),
283
- error: specified multiple times
- error: specified multiple times
+ error: derive(Diagnostic): specified multiple times
286 |
286 |
287 LL | suggestion: (Applicability, Applicability, Span),
293 LL | suggestion: (Applicability, Applicability, Span),
295
295
- error: `#[label = ...]` is not a valid attribute
+ error: derive(Diagnostic): `#[label = ...]` is not a valid attribute
298 |
298 |
299 LL | #[label = "bar"]
300 | ^^^^^^^^^^^^^^^^
301
- error: specified multiple times
- error: specified multiple times
+ error: derive(Diagnostic): specified multiple times
304 |
304 |
305 LL | #[suggestion(no_crate_suggestion, code = "...", applicability = "maybe-incorrect")]
311 LL | suggestion: (Span, Applicability),
313
- error: invalid applicability
- error: invalid applicability
+ error: derive(Diagnostic): invalid applicability
316 |
316 |
317 LL | #[suggestion(no_crate_suggestion, code = "...", applicability = "batman")]
318 | ^^^^^^^^
319
319
- error: the `#[help(...)]` attribute can only be applied to fields of type `Span`, `MultiSpan`, `bool` or `()`
+ error: derive(Diagnostic): the `#[help(...)]` attribute can only be applied to fields of type `Span`, `MultiSpan`, `bool` or `()`
322 |
322 |
323 LL | #[help(no_crate_help)]
324 | ^^^^^^^^^^^^^^^^^^^^^^
325
- error: a diagnostic slug must be the first argument to the attribute
- error: a diagnostic slug must be the first argument to the attribute
+ error: derive(Diagnostic): a diagnostic slug must be the first argument to the attribute
328 |
328 |
329 LL | #[label(no_crate_label, foo)]
330 | ^
331
331
- error: only `no_span` is a valid nested attribute
+ error: derive(Diagnostic): only `no_span` is a valid nested attribute
334 |
334 |
335 LL | #[label(no_crate_label, foo = "...")]
336 | ^^^
337
337
- error: only `no_span` is a valid nested attribute
+ error: derive(Diagnostic): only `no_span` is a valid nested attribute
340 |
340 |
341 LL | #[label(no_crate_label, foo("..."))]
342 | ^^^
343
343
- error: `#[primary_span]` is not a valid attribute
+ error: derive(Diagnostic): `#[primary_span]` is not a valid attribute
346 |
346 |
347 LL | #[primary_span]
349 |
349 |
350 = help: the `primary_span` field attribute is not valid for lint diagnostics
351
- error: `#[error(...)]` is not a valid attribute
+ error: derive(Diagnostic): `#[error(...)]` is not a valid attribute
354 |
355 LL | #[error(no_crate_example, code = "E0123")]
356 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
356 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
357
- error: diagnostic slug not specified
+ error: derive(Diagnostic): diagnostic slug not specified
360 |
361 LL | / #[error(no_crate_example, code = "E0123")]
367 |
367 |
368 = help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
369
- error: `#[warn_(...)]` is not a valid attribute
+ error: derive(Diagnostic): `#[warn_(...)]` is not a valid attribute
372 |
372 |
373 LL | #[warn_(no_crate_example, code = "E0123")]
374 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
375
- error: diagnostic slug not specified
- error: diagnostic slug not specified
+ error: derive(Diagnostic): diagnostic slug not specified
378 |
378 |
379 LL | / #[warn_(no_crate_example, code = "E0123")]
385 |
385 |
386 = help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
387
- error: `#[lint(...)]` is not a valid attribute
+ error: derive(Diagnostic): `#[lint(...)]` is not a valid attribute
390 |
391 LL | #[lint(no_crate_example, code = "E0123")]
392 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
392 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
393
- error: diagnostic slug not specified
+ error: derive(Diagnostic): diagnostic slug not specified
396 |
397 LL | / #[lint(no_crate_example, code = "E0123")]
403 |
403 |
404 = help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
405
- error: `#[lint(...)]` is not a valid attribute
+ error: derive(Diagnostic): `#[lint(...)]` is not a valid attribute
408 |
409 LL | #[lint(no_crate_example, code = "E0123")]
410 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
410 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
411
- error: `#[lint(...)]` is not a valid attribute
+ error: derive(Diagnostic): `#[lint(...)]` is not a valid attribute
414 |
415 LL | #[lint(no_crate_example, code = "E0123")]
417 |
417 |
418 = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
- error: diagnostic slug not specified
- error: diagnostic slug not specified
+ error: derive(Diagnostic): diagnostic slug not specified
422 |
423 LL | / #[lint(no_crate_example, code = "E0123")]
430 |
430 |
431 = help: specify the slug as the first argument to the attribute, such as `#[diag(compiletest_example)]`
- error: specified multiple times
- error: specified multiple times
+ error: derive(Diagnostic): specified multiple times
435 |
435 |
436 LL | #[suggestion(no_crate_suggestion, code = "...", code = ",,,")]
442 LL | #[suggestion(no_crate_suggestion, code = "...", code = ",,,")]
444
- error: wrong types for suggestion
- error: wrong types for suggestion
+ error: derive(Diagnostic): wrong types for suggestion
447 |
448 LL | suggestion: (Span, usize),
450 |
450 |
451 = help: `#[suggestion(...)]` on a tuple field must be applied to fields of type `(Span, Applicability)`
- error: wrong types for suggestion
- error: wrong types for suggestion
+ error: derive(Diagnostic): wrong types for suggestion
455 |
455 |
456 LL | suggestion: (Span,),
458 |
458 |
459 = help: `#[suggestion(...)]` on a tuple field must be applied to fields of type `(Span, Applicability)`
- error: suggestion without `code = "..."`
- error: suggestion without `code = "..."`
+ error: derive(Diagnostic): suggestion without `code = "..."`
463 |
463 |
464 LL | #[suggestion(no_crate_suggestion)]
465 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
466
466
- error: `#[multipart_suggestion(...)]` is not a valid attribute
+ error: derive(Diagnostic): `#[multipart_suggestion(...)]` is not a valid attribute
469 |
470 LL | #[multipart_suggestion(no_crate_suggestion)]
472 |
472 |
473 = help: consider creating a `Subdiagnostic` instead
474
- error: `#[multipart_suggestion(...)]` is not a valid attribute
+ error: derive(Diagnostic): `#[multipart_suggestion(...)]` is not a valid attribute
477 |
478 LL | #[multipart_suggestion()]
480 |
480 |
481 = help: consider creating a `Subdiagnostic` instead
482
- error: `#[multipart_suggestion(...)]` is not a valid attribute
+ error: derive(Diagnostic): `#[multipart_suggestion(...)]` is not a valid attribute
485 |
485 |
486 LL | #[multipart_suggestion(no_crate_suggestion)]
488 |
489 = help: consider creating a `Subdiagnostic` instead
490
490
- error: `#[suggestion(...)]` is not a valid attribute
+ error: derive(Diagnostic): `#[suggestion(...)]` is not a valid attribute
493 |
494 LL | #[suggestion(no_crate_suggestion, code = "...")]
496 |
---
error: cannot find attribute `multipart_suggestion` in this scope
##[error] --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.rs:648:7
|
LL | #[multipart_suggestion(no_crate_suggestion)]
error[E0425]: cannot find value `nonsense` in module `crate::fluent_generated`
##[error] --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.rs:71:8
|
|
LL | #[diag(nonsense, code = "E0123")]
| ^^^^^^^^ not found in `crate::fluent_generated`
error[E0425]: cannot find value `__code_34` in this scope
|
|
LL | #[derive(Diagnostic)] //~ ERROR cannot find value `__code_34` in this scope
|
= note: this error originates in the derive macro `Diagnostic` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `Hello: IntoDiagnosticArg` is not satisfied
|
LL | #[derive(Diagnostic)]
| ---------- required by a bound introduced by this call
...
...
LL | other: Hello,
| ^^^^^ the trait `IntoDiagnosticArg` is not implemented for `Hello`
= help: the following other types implement trait `IntoDiagnosticArg`:
bool
char
i8
i8
i16
i32
i64
i128
usize
and 65 others
note: required by a bound in `DiagnosticBuilder::<'a, G>::set_arg`
--> /rustc/FAKE_PREFIX/compiler/rustc_errors/src/diagnostic_builder.rs:505:5
= note: this error originates in the macro `forward` (in Nightly builds, run with -Z macro-backtrace for more info)
error: aborting due to 84 previous errors
Some errors have detailed explanations: E0277, E0425, E0433.
For more information about an error, try `rustc --explain E0277`.
also i know we settled on not showing stdout by default but it's useful for debugging search paths - maybe we should show it after all? it seems silly to have to pass both -Wl,--verbose and --verbose. https://github.com/rust-lang/rust/issues/46998#issuecomment-1868638316
The job x86_64-gnu-llvm-16 failed! Check out the build log: (web) (plain)
Click to see the possible cause of the failure (guessed by this bot)
Built container sha256:9c3c93a371e5aed5c18185b24f130d95d5140dbd72a9b325e7b6b49e521a4faa
Looks like docker image is the same as before, not uploading
https://ci-caches.rust-lang.org/docker/7ebc15c01a233894034d277c8cce4e949f4e7791f66b4727c8fb6e058a0b8171d6152e1441d677cef0653843ceeee469c097b8699b2bb74249e674f6aa1a8813
sha256:9c3c93a371e5aed5c18185b24f130d95d5140dbd72a9b325e7b6b49e521a4faa
Setting extra environment values for docker: --env ENABLE_GCC_CODEGEN=1 --env GCC_EXEC_PREFIX=/usr/lib/gcc/
[CI_JOB_NAME=x86_64-gnu-llvm-16]
##[group]Clock drift check
local time: Mon Dec 25 00:57:57 UTC 2023
network time: Mon, 25 Dec 2023 00:57:57 GMT
network time: Mon, 25 Dec 2023 00:57:57 GMT
##[endgroup]
sccache: Starting the server...
##[group]Configure the build
configure: processing command line
configure:
configure: build.configure-args := ['--build=x86_64-unknown-linux-gnu', '--llvm-root=/usr/lib/llvm-16', '--enable-llvm-link-shared', '--set', 'rust.thin-lto-import-instr-limit=10', '--enable-verbose-configure', '--enable-sccache', '--disable-manage-submodules', '--enable-locked-deps', '--enable-cargo-native-static', '--set', 'rust.codegen-units-std=1', '--set', 'dist.compression-profile=balanced', '--dist-compression-formats=xz', '--disable-dist-src', '--release-channel=nightly', '--enable-debug-assertions', '--enable-overflow-checks', '--enable-llvm-assertions', '--set', 'rust.verify-llvm-ir', '--set', 'rust.codegen-backends=llvm,cranelift,gcc', '--set', 'llvm.static-libstdcpp', '--enable-missing-tools', '--enable-new-symbol-mangling']
configure: target.x86_64-unknown-linux-gnu.llvm-config := /usr/lib/llvm-16/bin/llvm-config
configure: llvm.link-shared := True
configure: rust.thin-lto-import-instr-limit := 10
configure: rust.codegen-units-std := 1
---
##[endgroup]
Testing GCC stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
Compiling y v0.1.0 (/checkout/compiler/rustc_codegen_gcc/build_system)
Finished release [optimized] target(s) in 1.38s
Running `/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-codegen/x86_64-unknown-linux-gnu/release/y test --use-system-gcc --use-backend gcc --out-dir /checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/cg_gcc --release --no-default-features --mini-tests --std-tests`
Using system GCC
Using system GCC
[BUILD] example
[AOT] mini_core_hello_world
/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/cg_gcc/mini_core_hello_world
abc
---
##[group]Testing stage2 compiletest suite=run-make mode=run-make (x86_64-unknown-linux-gnu)
running 349 tests
................i.....i....ii........................................................... 88/349
......................................i..i..........F....F.......i....ii......i......... 176/349
.iii.................................ii.i......i...iiiiiiiii.iii.iii.i...............
failures:
---- [run-make] tests/run-make/link-args-order stdout ----
error: make failed
status: exit status: 2
command: cd "/checkout/tests/run-make/link-args-order" && env -u CARGO_MAKEFLAGS -u MAKEFLAGS -u MFLAGS -u RUSTFLAGS AR="ar" CC="cc -ffunction-sections -fdata-sections -fPIC -m64" CXX="c++ -ffunction-sections -fdata-sections -fPIC -m64" HOST_RPATH_DIR="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" LD_LIB_PATH_ENVVAR="LD_LIBRARY_PATH" LLVM_BIN_DIR="/usr/lib/llvm-16/bin" LLVM_COMPONENTS="aarch64 aarch64asmparser aarch64codegen aarch64desc aarch64disassembler aarch64info aarch64utils aggressiveinstcombine all all-targets amdgpu amdgpuasmparser amdgpucodegen amdgpudesc amdgpudisassembler amdgpuinfo amdgputargetmca amdgpuutils analysis arm armasmparser armcodegen armdesc armdisassembler arminfo armutils asmparser asmprinter avr avrasmparser avrcodegen avrdesc avrdisassembler avrinfo binaryformat bitreader bitstreamreader bitwriter bpf bpfasmparser bpfcodegen bpfdesc bpfdisassembler bpfinfo cfguard codegen core coroutines coverage debuginfocodeview debuginfodwarf debuginfogsym debuginfologicalview debuginfomsf debuginfopdb demangle dlltooldriver dwarflinker dwarflinkerparallel dwp engine executionengine extensions filecheck frontendhlsl frontendopenacc frontendopenmp fuzzercli fuzzmutate globalisel hexagon hexagonasmparser hexagoncodegen hexagondesc hexagondisassembler hexagoninfo instcombine instrumentation interfacestub interpreter ipo irprinter irreader jitlink lanai lanaiasmparser lanaicodegen lanaidesc lanaidisassembler lanaiinfo libdriver lineeditor linker loongarch loongarchasmparser loongarchcodegen loongarchdesc loongarchdisassembler loongarchinfo lto m68k m68kasmparser m68kcodegen m68kdesc m68kdisassembler m68kinfo mc mca mcdisassembler mcjit mcparser mips mipsasmparser mipscodegen mipsdesc mipsdisassembler mipsinfo mirparser msp430 msp430asmparser msp430codegen msp430desc msp430disassembler msp430info native nativecodegen nvptx nvptxcodegen nvptxdesc nvptxinfo objcarcopts objcopy object objectyaml option orcjit orcshared orctargetprocess passes perfjitevents powerpc powerpcasmparser powerpccodegen powerpcdesc powerpcdisassembler powerpcinfo profiledata remarks riscv riscvasmparser riscvcodegen riscvdesc riscvdisassembler riscvinfo riscvtargetmca runtimedyld scalaropts selectiondag sparc sparcasmparser sparccodegen sparcdesc sparcdisassembler sparcinfo support symbolize systemz systemzasmparser systemzcodegen systemzdesc systemzdisassembler systemzinfo tablegen target targetparser textapi transformutils ve veasmparser vecodegen vectorize vedesc vedisassembler veinfo webassembly webassemblyasmparser webassemblycodegen webassemblydesc webassemblydisassembler webassemblyinfo webassemblyutils windowsdriver windowsmanifest x86 x86asmparser x86codegen x86desc x86disassembler x86info x86targetmca xcore xcorecodegen xcoredesc xcoredisassembler xcoreinfo xray" LLVM_FILECHECK="/usr/lib/llvm-16/bin/FileCheck" NODE="/usr/bin/node" PYTHON="/usr/bin/python3" RUSTC="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" RUSTDOC="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustdoc" RUST_BUILD_STAGE="stage2-x86_64-unknown-linux-gnu" S="/checkout" TARGET="x86_64-unknown-linux-gnu" TARGET_RPATH_DIR="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" TMPDIR="/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/link-args-order/link-args-order" "make"
--- stdout -------------------------------
LD_LIBRARY_PATH="/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/link-args-order/link-args-order:/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib:/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-bootstrap-tools/x86_64-unknown-linux-gnu/release/deps:/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/lib" '/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc' --out-dir /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/link-args-order/link-args-order -L /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/link-args-order/link-args-order -Ainternal_features -C linker-flavor=ld -C link-arg=a -C link-args="b c" -C link-args="d e" -C link-arg=f empty.rs 2>&1 | "/checkout/src/etc/cat-and-grep.sh" '"a" "b" "c" "d" "e" "f"'
[[[ begin stdout ]]]
error: linking with `ld` failed: exit status: 1
Build completed unsuccessfully in 0:35:57
= note: use `--verbose` to show all linker arguments
= note: use `--verbose` to show all linker arguments
= note: ld: cannot find -lgcc_s: No such file or directory
error: aborting due to 1 previous error
[[[ end stdout ]]]
Error: cannot match: "a" "b" "c" "d" "e" "f"
--- stderr -------------------------------
make: *** [Makefile:9: all] Error 1
------------------------------------------
---- [run-make] tests/run-make/link-dedup stdout ----
error: make failed
status: exit status: 2
command: cd "/checkout/tests/run-make/link-dedup" && env -u CARGO_MAKEFLAGS -u MAKEFLAGS -u MFLAGS -u RUSTFLAGS AR="ar" CC="cc -ffunction-sections -fdata-sections -fPIC -m64" CXX="c++ -ffunction-sections -fdata-sections -fPIC -m64" HOST_RPATH_DIR="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" LD_LIB_PATH_ENVVAR="LD_LIBRARY_PATH" LLVM_BIN_DIR="/usr/lib/llvm-16/bin" LLVM_COMPONENTS="aarch64 aarch64asmparser aarch64codegen aarch64desc aarch64disassembler aarch64info aarch64utils aggressiveinstcombine all all-targets amdgpu amdgpuasmparser amdgpucodegen amdgpudesc amdgpudisassembler amdgpuinfo amdgputargetmca amdgpuutils analysis arm armasmparser armcodegen armdesc armdisassembler arminfo armutils asmparser asmprinter avr avrasmparser avrcodegen avrdesc avrdisassembler avrinfo binaryformat bitreader bitstreamreader bitwriter bpf bpfasmparser bpfcodegen bpfdesc bpfdisassembler bpfinfo cfguard codegen core coroutines coverage debuginfocodeview debuginfodwarf debuginfogsym debuginfologicalview debuginfomsf debuginfopdb demangle dlltooldriver dwarflinker dwarflinkerparallel dwp engine executionengine extensions filecheck frontendhlsl frontendopenacc frontendopenmp fuzzercli fuzzmutate globalisel hexagon hexagonasmparser hexagoncodegen hexagondesc hexagondisassembler hexagoninfo instcombine instrumentation interfacestub interpreter ipo irprinter irreader jitlink lanai lanaiasmparser lanaicodegen lanaidesc lanaidisassembler lanaiinfo libdriver lineeditor linker loongarch loongarchasmparser loongarchcodegen loongarchdesc loongarchdisassembler loongarchinfo lto m68k m68kasmparser m68kcodegen m68kdesc m68kdisassembler m68kinfo mc mca mcdisassembler mcjit mcparser mips mipsasmparser mipscodegen mipsdesc mipsdisassembler mipsinfo mirparser msp430 msp430asmparser msp430codegen msp430desc msp430disassembler msp430info native nativecodegen nvptx nvptxcodegen nvptxdesc nvptxinfo objcarcopts objcopy object objectyaml option orcjit orcshared orctargetprocess passes perfjitevents powerpc powerpcasmparser powerpccodegen powerpcdesc powerpcdisassembler powerpcinfo profiledata remarks riscv riscvasmparser riscvcodegen riscvdesc riscvdisassembler riscvinfo riscvtargetmca runtimedyld scalaropts selectiondag sparc sparcasmparser sparccodegen sparcdesc sparcdisassembler sparcinfo support symbolize systemz systemzasmparser systemzcodegen systemzdesc systemzdisassembler systemzinfo tablegen target targetparser textapi transformutils ve veasmparser vecodegen vectorize vedesc vedisassembler veinfo webassembly webassemblyasmparser webassemblycodegen webassemblydesc webassemblydisassembler webassemblyinfo webassemblyutils windowsdriver windowsmanifest x86 x86asmparser x86codegen x86desc x86disassembler x86info x86targetmca xcore xcorecodegen xcoredesc xcoredisassembler xcoreinfo xray" LLVM_FILECHECK="/usr/lib/llvm-16/bin/FileCheck" NODE="/usr/bin/node" PYTHON="/usr/bin/python3" RUSTC="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" RUSTDOC="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustdoc" RUST_BUILD_STAGE="stage2-x86_64-unknown-linux-gnu" S="/checkout" TARGET="x86_64-unknown-linux-gnu" TARGET_RPATH_DIR="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" TMPDIR="/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/link-dedup/link-dedup" "make"
--- stdout -------------------------------
LD_LIBRARY_PATH="/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/link-dedup/link-dedup:/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib:/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-bootstrap-tools/x86_64-unknown-linux-gnu/release/deps:/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/lib" '/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc' --out-dir /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/link-dedup/link-dedup -L /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/link-dedup/link-dedup -Ainternal_features depa.rs
LD_LIBRARY_PATH="/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/link-dedup/link-dedup:/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib:/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-bootstrap-tools/x86_64-unknown-linux-gnu/release/deps:/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/lib" '/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc' --out-dir /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/link-dedup/link-dedup -L /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/link-dedup/link-dedup -Ainternal_features depb.rs
LD_LIBRARY_PATH="/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/link-dedup/link-dedup:/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib:/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-bootstrap-tools/x86_64-unknown-linux-gnu/release/deps:/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/lib" '/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc' --out-dir /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/link-dedup/link-dedup -L /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/link-dedup/link-dedup -Ainternal_features depc.rs
LD_LIBRARY_PATH="/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/link-dedup/link-dedup:/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib:/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-bootstrap-tools/x86_64-unknown-linux-gnu/release/deps:/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/lib" '/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc' --out-dir /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/link-dedup/link-dedup -L /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/link-dedup/link-dedup -Ainternal_features empty.rs --cfg bar 2>&1 | "/checkout/src/etc/cat-and-grep.sh" '"-ltesta" "-ltestb" "-ltesta"'
[[[ begin stdout ]]]
error: linking with `cc` failed: exit status: 1
= note: use `--verbose` to show all linker arguments
= note: use `--verbose` to show all linker arguments
= note: /usr/bin/ld: cannot find -ltesta: No such file or directory
/usr/bin/ld: cannot find -ltestb: No such file or directory
/usr/bin/ld: cannot find -ltesta: No such file or directory
collect2: error: ld returned 1 exit status
error: aborting due to 1 previous error
[[[ end stdout ]]]
Error: cannot match: "-ltesta" "-ltestb" "-ltesta"
--- stderr -------------------------------
make: *** [Makefile:9: all] Error 1
------------------------------------------
:umbrella: The latest upstream changes (presumably #119662) made this pull request unmergeable. Please resolve the merge conflicts.
The job x86_64-gnu-llvm-16 failed! Check out the build log: (web) (plain)
Click to see the possible cause of the failure (guessed by this bot)
Built container sha256:9c3c93a371e5aed5c18185b24f130d95d5140dbd72a9b325e7b6b49e521a4faa
Looks like docker image is the same as before, not uploading
https://ci-caches.rust-lang.org/docker/7ebc15c01a233894034d277c8cce4e949f4e7791f66b4727c8fb6e058a0b8171d6152e1441d677cef0653843ceeee469c097b8699b2bb74249e674f6aa1a8813
sha256:9c3c93a371e5aed5c18185b24f130d95d5140dbd72a9b325e7b6b49e521a4faa
Setting extra environment values for docker: --env ENABLE_GCC_CODEGEN=1 --env GCC_EXEC_PREFIX=/usr/lib/gcc/
[CI_JOB_NAME=x86_64-gnu-llvm-16]
##[group]Clock drift check
local time: Fri Jan 19 23:34:57 UTC 2024
network time: Fri, 19 Jan 2024 23:34:57 GMT
network time: Fri, 19 Jan 2024 23:34:57 GMT
##[endgroup]
sccache: Starting the server...
##[group]Configure the build
configure: processing command line
configure:
configure: build.configure-args := ['--build=x86_64-unknown-linux-gnu', '--llvm-root=/usr/lib/llvm-16', '--enable-llvm-link-shared', '--set', 'rust.thin-lto-import-instr-limit=10', '--set', 'change-id=99999999', '--enable-verbose-configure', '--enable-sccache', '--disable-manage-submodules', '--enable-locked-deps', '--enable-cargo-native-static', '--set', 'rust.codegen-units-std=1', '--set', 'dist.compression-profile=balanced', '--dist-compression-formats=xz', '--set', 'build.optimized-compiler-builtins', '--disable-dist-src', '--release-channel=nightly', '--enable-debug-assertions', '--enable-overflow-checks', '--enable-llvm-assertions', '--set', 'rust.verify-llvm-ir', '--set', 'rust.codegen-backends=llvm,cranelift,gcc', '--set', 'llvm.static-libstdcpp', '--enable-new-symbol-mangling']
configure: target.x86_64-unknown-linux-gnu.llvm-config := /usr/lib/llvm-16/bin/llvm-config
configure: llvm.link-shared := True
configure: rust.thin-lto-import-instr-limit := 10
configure: change-id := 99999999
---
failures:
---- [incremental] tests/incremental/commandline-args.rs stdout ----
error in revision `rpass3`: compilation failed!
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/incremental/commandline-args.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--cfg" "rpass3" "-C" "incremental=/checkout/obj/build/x86_64-unknown-linux-gnu/test/incremental/commandline-args/commandline-args.inc" "-Z" "incremental-verify-ich" "-O" "--error-format" "json" "--json" "future-incompat" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/incremental/commandline-args/a" "-A" "internal_features" "-Crpath" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/incremental/commandline-args/auxiliary" "-Z" "query-dep-graph" "-C" "debuginfo=2" "--verbose"
--- stderr -------------------------------
--- stderr -------------------------------
error: CGU-reuse for `commandline_args` is `No` but should be `PreLto`
Build completed unsuccessfully in 0:13:16
|
|
LL | #![rustc_partition_reused(module="commandline_args", cfg="rpass3")]
error: aborting due to 1 previous error
------------------------------------------
hmm. that test has the following comment: https://github.com/rust-lang/rust/blob/e9a009fd1a9ce00ee07eeb17bc8e9985815a1296/tests/incremental/commandline-args.rs#L13-L20
i suppose those lines are all invalid now, it should be testing that the CGU is not reused? i'm not sure why it's testing --verbose specifically, maybe it's enough to test any untracked CLI arg. i'll change it to --diagnostic-width.
i'm realizing your comments are all about https://github.com/rust-lang/rust/pull/119129. i feel slightly uncomfortable making unrelated changes in this PR ... how do you feel about splitting them into a separate PR so i can assign michaelwoerister?
how do you feel about splitting them into a separate PR so i can assign michaelwoerister?
Sure
hide the linker cli args unless --verbose is passed
I prefer not doing this. It is helpful whenever a linkage issue is opened to not have to ask to rerun with RUSTFLAGS="--verbose". If you revert this change r=me. If you still want to keep it, let me thing about it for a bit.
@bors r+
:pushpin: Commit aac51d50fb3641f8679badfb60e58b55c980b859 has been approved by bjorn3
It is now in the queue for this repository.
This might've caused a rollup failure here: https://github.com/rust-lang/rust/pull/120359#issuecomment-1911360818
but a lack of rust-log-analyzer comment, i'll just mark this rollup=never so it fails on its own, rather than r-'ing it.
@bors rollup=never
Actually nvm, here's the test failure:
2024-01-26T03:16:45.5341990Z command: RUSTC_ICE="0" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/bin/rustc" "/Users/runner/work/rust/rust/tests/ui/zero-sized/zero-sized-btreemap-insert.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/Users/runner/.cargo" "--sysroot" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2" "--target=x86_64-apple-darwin" "-O" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "-C" "prefer-dynamic" "-o" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/ui/zero-sized/zero-sized-btreemap-insert/a" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/Users/runner/work/rust/rust/build/x86_64-apple-darwin/native/rust-test-helpers" "-L" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/ui/zero-sized/zero-sized-btreemap-insert/auxiliary"
2024-01-26T03:16:45.5342230Z stdout: none
2024-01-26T03:16:45.5342580Z --- stderr -------------------------------
2024-01-26T03:16:45.5343990Z warning: linker stderr: ld: directory not found for option '-L/Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/ui/zero-sized/zero-sized-btreemap-insert/auxiliary'
2024-01-26T03:16:45.5344000Z
2024-01-26T03:16:45.5344180Z warning: 1 warning emitted
2024-01-26T03:16:45.5344400Z ------------------------------------------
2024-01-26T03:16:45.5344410Z
2024-01-26T03:16:45.5344420Z
2024-01-26T03:16:45.5344780Z ---- [ui] tests/ui/wrong-hashset-issue-42918.rs stdout ----
2024-01-26T03:16:45.5344950Z normalized stderr:
2024-01-26T03:16:45.5345780Z warning: linker stderr: ld: directory not found for option '-L$TEST_BUILD_DIR/wrong-hashset-issue-42918/auxiliary'
2024-01-26T03:16:45.5345800Z
2024-01-26T03:16:45.5345970Z warning: 1 warning emitted
2024-01-26T03:16:45.5345980Z
2024-01-26T03:16:45.5345990Z
2024-01-26T03:16:45.5345990Z
2024-01-26T03:16:45.5346010Z
2024-01-26T03:16:45.5346290Z The actual stderr differed from the expected stderr.
2024-01-26T03:16:45.5347460Z Actual stderr saved to /Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/ui/wrong-hashset-issue-42918/wrong-hashset-issue-42918.stderr
2024-01-26T03:16:45.5347910Z To update references, rerun the tests and pass the `--bless` flag
2024-01-26T03:16:45.5348520Z To only update this specific test, also pass `--test-args wrong-hashset-issue-42918.rs`
2024-01-26T03:16:45.5348530Z
2024-01-26T03:16:45.5348760Z error: 1 errors occurred comparing output.
@bors r-
this should be marked rollup=iffy; there are likely going to be warnings on other platforms that were silenced before.
@rustbot ready
:umbrella: The latest upstream changes (presumably #119972) made this pull request unmergeable. Please resolve the merge conflicts.
@bors r+
:pushpin: Commit fde996613bb08f205c75c51b62bc1e8ad6fa904c has been approved by bjorn3
It is now in the queue for this repository.
@bors rollup=iffy
:hourglass: Testing commit fde996613bb08f205c75c51b62bc1e8ad6fa904c with merge 6f77ebe5d8e27c38a95c0699896adc1c07e0c2ce...
:broken_heart: Test failed - checks-actions
lol what on earth AFAICT there are two types of warnings: 1.
warning: linker stderr: Warning: .drectve `-exclude-symbols:_ZN17compiler_builtins3mem6memcpy17h33c7778f71cce9faE ' unrecognized
Warning: .drectve `-exclude-symbols:_ZN17compiler_builtins3mem7memmove17ha30886041cd704b7E ' unrecognized
2024-01-30T23:15:45.4590600Z ---- [ui] tests\ui\array-slice-vec\nested-vec-1.rs stdout ----
2024-01-30T23:15:45.4591032Z normalized stderr:
2024-01-30T23:15:45.4591439Z warning: linker stderr: Warning: corrupt .drectve at end of def file
the first one looks like https://github.com/rust-lang/rust/issues/112368, probably? that's related to an old linker version, i'm not sure what version we're using in CI. the second one is what's actually causing tests to fail and i don't have ideas for fixing it. maybe @mati865 knows.
anyway i'm probably not going to put much more time into this pr
the first one looks like #112368, probably? that's related to an old linker version, i'm not sure what version we're using in CI.
Because getting a newer one is not a trivial task ;) https://github.com/rust-lang/rust/pull/119229
the second one is what's actually causing tests to fail and i don't have ideas for fixing it
Oh, that's strange. In the past, Rust used .def files only to let the linker know which symbols to export. Maybe something has changed (likely accidentally), but we'd need to dump that file and see its contents.
@bors r-
Probably someone clicked the synchronize button.
i am not planning to work on this more, someone else can pick it up if they care
Oh, that's strange. In the past, Rust used
.deffiles only to let the linker know which symbols to export. Maybe something has changed (likely accidentally), but we'd need to dump that file and see its contents.
hmm. so i've managed to replicate this locally - here is an example CLI that shows the warning:
PS C:\Users\jyn\src\rust3> & "x86_64-w64-mingw32-gcc" "-fno-use-linker-plugin" "-Wl,--dynamicbase" "-Wl,--disable-auto-image-base" "-m64" "-Wl,--high-entropy-va" "C:\\Users\\jyn\\src\\rust3\\build\\x86_64-pc-windows-gnu\\stage1\lib\rustlib\x86_64-pc-windows-gnu\lib\rsbegin.o" "C:\Users\jyn\AppData\Local\Temp\rustcy5MVsm\symbols.o" "C:\\Users\\jyn\\src\\rust3\\build\\x86_64-pc-windows-gnu\\test\\ui\\array-slice-vec\\nested-vec-1\a.nested_vec_1.6a5f33ca560ac6e-cgu.0.rcgu.o" "-Wl,-Bdynamic" "C:\\Users\\jyn\\src\\rust3\\build\\x86_64-pc-windows-gnu\\stage1\lib\rustlib\x86_64-pc-windows-gnu\lib\std-d175a540d94bb717.dll" "-Wl,-Bstatic" "C:\\Users\\jyn\\src\\rust3\\build\\x86_64-pc-windows-gnu\\stage1\lib\rustlib\x86_64-pc-windows-gnu\lib\libcompiler_builtins-5768d73ebd6f88da.rlib" "-Wl,-Bdynamic" "-lkernel32" "-lkernel32" "-ladvapi32" "-lntdll" "-luserenv" "-lws2_32" "C:\Users\jyn\AppData\Local\Temp\rustcy5MVsm\api-ms-win-core-synch-l1-2-0.dll_imports_indirect.lib" "C:\Users\jyn\AppData\Local\Temp\rustcy5MVsm\bcryptprimitives.dll_imports_indirect.lib" "-lgcc_s" "-lmsvcrt" "-lmingwex" "-lmingw32" "-lgcc" "-lmsvcrt" "-lmingwex" "-luser32" "-lkernel32" "-Wl,--nxcompat" "-L" "C:\\Users\\jyn\\src\\rust3\\build\\x86_64-pc-windows-gnu\\native\\rust-test-helpers" "-o" "C:\\Users\\jyn\\src\\rust3\\build\\x86_64-pc-windows-gnu\\test\\ui\\array-slice-vec\\nested-vec-1\\a.exe" "-Wl,--gc-sections" "-no-pie" "-Wl,-O1" "-Wl,--strip-debug" "-nodefaultlibs" "C:\\Users\\jyn\\src\\rust3\\build\\x86_64-pc-windows-gnu\\stage1\lib\rustlib\x86_64-pc-windows-gnu\lib\rsend.o"
i managed to shrink it to something this small:
& "x86_64-w64-mingw32-gcc" "C:\\Users\\jyn\\src\\rust3\\build\\x86_64-pc-windows-gnu\\test\\ui\\array-slice-vec\\nested-vec-1\a.nested_vec_1.6a5f33ca560ac6e-cgu.0.rcgu.o"
(note that this doesn't link, because it's missing lib\std.dll, but it still emits the warning. you can add back std.dll if you want to inspect the final .exe.)
so that seems a pretty clear indication that rustc or llvm is doing something weird when generating the final binary, it's not dependent on any runtime libraries or the shared object generated for std. here's that .o file:
a.nested_vec_1.6a5f33ca560ac6e-cgu.0.rcgu.zip
and a disassembly of the .drectve section:
Disassembly of section .drectve:
0000000000000000 <.drectve>:
0: 20 2d 65 78 63 6c and %ch,0x6c637865(%rip) # 6c63786b <main+0x6c6377db>
6: 75 64 jne 6c <_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h06be5856a7b06a86E+0xc>
8: 65 2d 73 79 6d 62 gs sub $0x626d7973,%eax
e: 6f outsl %ds:(%rsi),(%dx)
f: 6c insb (%dx),%es:(%rdi)
10: 73 3a jae 4c <_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h05b4922cc1d6afa3E+0x1c>
12: 5f pop %rdi
13: 5a pop %rdx
14: 4e 33 73 74 rex.WRX xor 0x74(%rbx),%r14
18: 64 32 72 74 xor %fs:0x74(%rdx),%dh
1c: 31 30 xor %esi,(%rax)
1e: 6c insb (%dx),%es:(%rdi)
1f: 61 (bad)
20: 6e outsb %ds:(%rsi),(%dx)
21: 67 5f addr32 pop %rdi
23: 73 74 jae 99 <main+0x9>
25: 61 (bad)
26: 72 74 jb 9c <main+0xc>
28: 31 37 xor %esi,(%rdi)
2a: 68 66 35 39 34 push $0x34393566
2f: 35 30 37 32 65 xor $0x65323730,%eax
34: 33 66 65 xor 0x65(%rsi),%esp
37: 65 32 62 39 xor %gs:0x39(%rdx),%ah
3b: 45 rex.RB
my x86 is pretty rusty but that looks ... pretty normal to me? i'm not sure why mingw-gcc is choking on it.
1f: 61 (bad) 25: 61 (bad)
oh that doesn't look good lol
welp
http://ref.x86asm.net/coder64.html#x61
I think this is https://github.com/rust-lang/rust/issues/112368 As I understand it, LLVM emits a correct .drectve section with linker arguments, but the GNU linker incorrectly fails to parse the section and emits a warning.
I think this is #112368 As I understand it, LLVM emits a correct
.drectvesection with linker arguments, but the GNU linker incorrectly fails to parse the section and emits a warning.
oh cool. apparently this is fixed in ld 2.40. i have 2.39 locally, https://github.com/rust-lang/rust/pull/119229/ looks like it uses 2.42. so hopefully this will be unblocked soon.