Skip to content

Commit f38bc02

Browse files
committed
Auto merge of #145865 - Zalathar:rollup-x7wk361, r=Zalathar
Rollup of 13 pull requests Successful merges: - #143193 (Port `#[link]` to the new attribute parsing infrastructure ) - #143689 (Allow linking a prebuilt optimized compiler-rt builtins library) - #144885 (Implement some more checks in `ptr_guaranteed_cmp`. ) - #145535 (make rustdoc::invalid_html_tags more robust) - #145766 (test(rustfmt): Verify frontmatter is preserved) - #145811 (Fix some minor issues in comments) - #145814 (Handle unwinding fatal errors in codegen workers) - #145815 (Wait for DPkg frontend lock when trying to remove packages) - #145821 (compiletest: if a compiler fails, show its output) - #145845 (Make `x test distcheck` self-contained) - #145847 (Don't show warnings from xcrun with -Zverbose-internals) - #145856 (Update books) - #145858 (Update wasm-component-ld dependency) r? `@ghost` `@rustbot` modify labels: rollup
2 parents d327d65 + 1730b2d commit f38bc02

File tree

98 files changed

+2891
-1562
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

+2891
-1562
lines changed

Cargo.lock

Lines changed: 31 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -3480,6 +3480,7 @@ dependencies = [
34803480
"rustc_parse",
34813481
"rustc_session",
34823482
"rustc_span",
3483+
"rustc_target",
34833484
"thin-vec",
34843485
]
34853486

@@ -5988,9 +5989,9 @@ dependencies = [
59885989

59895990
[[package]]
59905991
name = "wasi-preview1-component-adapter-provider"
5991-
version = "34.0.2"
5992+
version = "36.0.1"
59925993
source = "registry+https://github.com/rust-lang/crates.io-index"
5993-
checksum = "33696c5f1ff1e083de9f36c3da471abd736362bc173e093f8b0b1ed5a387e39b"
5994+
checksum = "20689c88791776219f78c2529700d15e6a9bd57a27858c62e9ef8487956b571c"
59945995

59955996
[[package]]
59965997
name = "wasm-bindgen"
@@ -6052,17 +6053,17 @@ dependencies = [
60526053

60536054
[[package]]
60546055
name = "wasm-component-ld"
6055-
version = "0.5.15"
6056+
version = "0.5.16"
60566057
source = "registry+https://github.com/rust-lang/crates.io-index"
6057-
checksum = "6d95124e34fee1316222e03b9bbf41af186ecbae2c8b79f8debe6e21b3ff60c5"
6058+
checksum = "14cd35d6cae91109a0ffd207b573cf3c741cab7e921dd376ea7aaf2c52a3408c"
60586059
dependencies = [
60596060
"anyhow",
60606061
"clap",
60616062
"lexopt",
60626063
"libc",
60636064
"tempfile",
60646065
"wasi-preview1-component-adapter-provider",
6065-
"wasmparser 0.234.0",
6066+
"wasmparser 0.237.0",
60666067
"wat",
60676068
"windows-sys 0.59.0",
60686069
"winsplit",
@@ -6089,34 +6090,24 @@ dependencies = [
60896090

60906091
[[package]]
60916092
name = "wasm-encoder"
6092-
version = "0.234.0"
6093-
source = "registry+https://github.com/rust-lang/crates.io-index"
6094-
checksum = "170a0157eef517a179f2d20ed7c68df9c3f7f6c1c047782d488bf5a464174684"
6095-
dependencies = [
6096-
"leb128fmt",
6097-
"wasmparser 0.234.0",
6098-
]
6099-
6100-
[[package]]
6101-
name = "wasm-encoder"
6102-
version = "0.236.1"
6093+
version = "0.237.0"
61036094
source = "registry+https://github.com/rust-lang/crates.io-index"
6104-
checksum = "724fccfd4f3c24b7e589d333fc0429c68042897a7e8a5f8694f31792471841e7"
6095+
checksum = "efe92d1321afa53ffc88a57c497bb7330c3cf84c98ffdba4a4caf6a0684fad3c"
61056096
dependencies = [
61066097
"leb128fmt",
6107-
"wasmparser 0.236.1",
6098+
"wasmparser 0.237.0",
61086099
]
61096100

61106101
[[package]]
61116102
name = "wasm-metadata"
6112-
version = "0.234.0"
6103+
version = "0.237.0"
61136104
source = "registry+https://github.com/rust-lang/crates.io-index"
6114-
checksum = "a42fe3f5cbfb56fc65311ef827930d06189160038e81db62188f66b4bf468e3a"
6105+
checksum = "4cc0b0a0c4f35ca6efa7a797671372915d4e9659dba2d59edc6fafc931d19997"
61156106
dependencies = [
61166107
"anyhow",
61176108
"indexmap",
6118-
"wasm-encoder 0.234.0",
6119-
"wasmparser 0.234.0",
6109+
"wasm-encoder 0.237.0",
6110+
"wasmparser 0.237.0",
61206111
]
61216112

61226113
[[package]]
@@ -6131,46 +6122,45 @@ dependencies = [
61316122

61326123
[[package]]
61336124
name = "wasmparser"
6134-
version = "0.234.0"
6125+
version = "0.236.1"
61356126
source = "registry+https://github.com/rust-lang/crates.io-index"
6136-
checksum = "be22e5a8f600afce671dd53c8d2dd26b4b7aa810fd18ae27dfc49737f3e02fc5"
6127+
checksum = "a9b1e81f3eb254cf7404a82cee6926a4a3ccc5aad80cc3d43608a070c67aa1d7"
61376128
dependencies = [
61386129
"bitflags",
6139-
"hashbrown",
61406130
"indexmap",
6141-
"semver",
6142-
"serde",
61436131
]
61446132

61456133
[[package]]
61466134
name = "wasmparser"
6147-
version = "0.236.1"
6135+
version = "0.237.0"
61486136
source = "registry+https://github.com/rust-lang/crates.io-index"
6149-
checksum = "a9b1e81f3eb254cf7404a82cee6926a4a3ccc5aad80cc3d43608a070c67aa1d7"
6137+
checksum = "7d2a40ca0d2bdf4b0bf36c13a737d0b2c58e4c8aaefe1c57f336dd75369ca250"
61506138
dependencies = [
61516139
"bitflags",
6140+
"hashbrown",
61526141
"indexmap",
61536142
"semver",
6143+
"serde",
61546144
]
61556145

61566146
[[package]]
61576147
name = "wast"
6158-
version = "236.0.1"
6148+
version = "237.0.0"
61596149
source = "registry+https://github.com/rust-lang/crates.io-index"
6160-
checksum = "d3bec4b4db9c6808d394632fd4b0cd4654c32c540bd3237f55ee6a40fff6e51f"
6150+
checksum = "fcf66f545acbd55082485cb9a6daab54579cb8628a027162253e8e9f5963c767"
61616151
dependencies = [
61626152
"bumpalo",
61636153
"leb128fmt",
61646154
"memchr",
61656155
"unicode-width 0.2.1",
6166-
"wasm-encoder 0.236.1",
6156+
"wasm-encoder 0.237.0",
61676157
]
61686158

61696159
[[package]]
61706160
name = "wat"
6171-
version = "1.236.1"
6161+
version = "1.237.0"
61726162
source = "registry+https://github.com/rust-lang/crates.io-index"
6173-
checksum = "64475e2f77d6071ce90624098fc236285ddafa8c3ea1fb386f2c4154b6c2bbdb"
6163+
checksum = "27975186f549e4b8d6878b627be732863883c72f7bf4dcf8f96e5f8242f73da9"
61746164
dependencies = [
61756165
"wast",
61766166
]
@@ -6659,9 +6649,9 @@ dependencies = [
66596649

66606650
[[package]]
66616651
name = "wit-component"
6662-
version = "0.234.0"
6652+
version = "0.237.0"
66636653
source = "registry+https://github.com/rust-lang/crates.io-index"
6664-
checksum = "5a8888169acf4c6c4db535beb405b570eedac13215d6821ca9bd03190f7f8b8c"
6654+
checksum = "bfb7674f76c10e82fe00b256a9d4ffb2b8d037d42ab8e9a83ebb3be35c9d0bf6"
66656655
dependencies = [
66666656
"anyhow",
66676657
"bitflags",
@@ -6670,17 +6660,17 @@ dependencies = [
66706660
"serde",
66716661
"serde_derive",
66726662
"serde_json",
6673-
"wasm-encoder 0.234.0",
6663+
"wasm-encoder 0.237.0",
66746664
"wasm-metadata",
6675-
"wasmparser 0.234.0",
6665+
"wasmparser 0.237.0",
66766666
"wit-parser",
66776667
]
66786668

66796669
[[package]]
66806670
name = "wit-parser"
6681-
version = "0.234.0"
6671+
version = "0.237.0"
66826672
source = "registry+https://github.com/rust-lang/crates.io-index"
6683-
checksum = "465492df47d8dcc015a3b7f241aed8ea03688fee7c5e04162285c5b1a3539c8b"
6673+
checksum = "ce2596a5bc7c24cc965b56ad6ff9e32394c4e401764f89620a888519c6e849ab"
66846674
dependencies = [
66856675
"anyhow",
66866676
"id-arena",
@@ -6691,7 +6681,7 @@ dependencies = [
66916681
"serde_derive",
66926682
"serde_json",
66936683
"unicode-xid",
6694-
"wasmparser 0.234.0",
6684+
"wasmparser 0.237.0",
66956685
]
66966686

66976687
[[package]]

bootstrap.example.toml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -407,8 +407,11 @@
407407
#build.profiler = false
408408

409409
# Use the optimized LLVM C intrinsics for `compiler_builtins`, rather than Rust intrinsics.
410-
# Requires the LLVM submodule to be managed by bootstrap (i.e. not external) so that `compiler-rt`
411-
# sources are available.
410+
# Choosing true requires the LLVM submodule to be managed by bootstrap (i.e. not external)
411+
# so that `compiler-rt` sources are available.
412+
#
413+
# Setting this to a path removes the requirement for a C toolchain, but requires setting the
414+
# path to an existing library containing the builtins library from LLVM's compiler-rt.
412415
#
413416
# Setting this to `false` generates slower code, but removes the requirement for a C toolchain in
414417
# order to run `x check`.
@@ -1041,13 +1044,15 @@
10411044
#runner = <none> (string)
10421045

10431046
# Use the optimized LLVM C intrinsics for `compiler_builtins`, rather than Rust intrinsics
1044-
# on this target.
1045-
# Requires the LLVM submodule to be managed by bootstrap (i.e. not external) so that `compiler-rt`
1046-
# sources are available.
1047+
# on this target. Choosing true requires the LLVM submodule to be managed by bootstrap
1048+
# (i.e. not external) so that `compiler-rt` sources are available.
1049+
#
1050+
# Setting this to a path removes the requirement for a C toolchain, but requires setting the
1051+
# path to an existing library containing the builtins library from LLVM's compiler-rt.
10471052
#
10481053
# Setting this to `false` generates slower code, but removes the requirement for a C toolchain in
10491054
# order to run `x check`.
1050-
#optimized-compiler-builtins = build.optimized-compiler-builtins (bool)
1055+
#optimized-compiler-builtins = build.optimized-compiler-builtins (bool or path)
10511056

10521057
# Link the compiler and LLVM against `jemalloc` instead of the default libc allocator.
10531058
# This overrides the global `rust.jemalloc` option. See that option for more info.

compiler/rustc_attr_parsing/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,6 @@ rustc_macros = { path = "../rustc_macros" }
1717
rustc_parse = { path = "../rustc_parse" }
1818
rustc_session = { path = "../rustc_session" }
1919
rustc_span = { path = "../rustc_span" }
20+
rustc_target = { path = "../rustc_target" }
2021
thin-vec = "0.2.12"
2122
# tidy-alphabetical-end

compiler/rustc_attr_parsing/messages.ftl

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,3 +189,55 @@ attr_parsing_invalid_meta_item = expected a literal (`1u8`, `1.0f32`, `"string"`
189189
190190
attr_parsing_suffixed_literal_in_attribute = suffixed literals are not allowed in attributes
191191
.help = instead of using a suffixed literal (`1u8`, `1.0f32`, etc.), use an unsuffixed version (`1`, `1.0`, etc.)
192+
193+
attr_parsing_as_needed_compatibility =
194+
linking modifier `as-needed` is only compatible with `dylib` and `framework` linking kinds
195+
196+
attr_parsing_bundle_needs_static =
197+
linking modifier `bundle` is only compatible with `static` linking kind
198+
199+
attr_parsing_empty_link_name =
200+
link name must not be empty
201+
.label = empty link name
202+
203+
attr_parsing_import_name_type_raw =
204+
import name type can only be used with link kind `raw-dylib`
205+
206+
attr_parsing_import_name_type_x86 =
207+
import name type is only supported on x86
208+
209+
attr_parsing_incompatible_wasm_link =
210+
`wasm_import_module` is incompatible with other arguments in `#[link]` attributes
211+
212+
attr_parsing_invalid_link_modifier =
213+
invalid linking modifier syntax, expected '+' or '-' prefix before one of: bundle, verbatim, whole-archive, as-needed
214+
215+
attr_parsing_link_arg_unstable =
216+
link kind `link-arg` is unstable
217+
218+
attr_parsing_link_cfg_unstable =
219+
link cfg is unstable
220+
221+
attr_parsing_link_framework_apple =
222+
link kind `framework` is only supported on Apple targets
223+
224+
attr_parsing_link_requires_name =
225+
`#[link]` attribute requires a `name = "string"` argument
226+
.label = missing `name` argument
227+
228+
attr_parsing_multiple_modifiers =
229+
multiple `{$modifier}` modifiers in a single `modifiers` argument
230+
231+
attr_parsing_multiple_renamings =
232+
multiple renamings were specified for library `{$lib_name}`
233+
attr_parsing_raw_dylib_no_nul =
234+
link name must not contain NUL characters if link kind is `raw-dylib`
235+
236+
attr_parsing_raw_dylib_elf_unstable =
237+
link kind `raw-dylib` is unstable on ELF platforms
238+
239+
attr_parsing_raw_dylib_only_windows =
240+
link kind `raw-dylib` is only supported on Windows targets
241+
242+
attr_parsing_whole_archive_needs_static =
243+
linking modifier `whole-archive` is only compatible with `static` linking kind

compiler/rustc_attr_parsing/src/attributes/cfg.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ pub fn parse_cfg_attr<'c, S: Stage>(
3636
parse_cfg_entry(cx, single)
3737
}
3838

39-
fn parse_cfg_entry<S: Stage>(
39+
pub(crate) fn parse_cfg_entry<S: Stage>(
4040
cx: &mut AcceptContext<'_, '_, S>,
4141
item: &MetaItemOrLitParser<'_>,
4242
) -> Option<CfgEntry> {

0 commit comments

Comments
 (0)