Skip to content

Commit 6d8f5d8

Browse files
committed
Pin memchr to 2.5.0 in the library rather than rustc_ast
The latest versions of `memchr` experience LTO-related issues when compiling for windows-gnu [1], so needs to be pinned. The issue is present in the standard library. `memchr` has been pinned in `rustc_ast`, but since the workspace was recently split, this pin no longer has any effect on library crates. Resolve this by adding `memchr` as an _unused_ dependency in `std`, pinned to 2.5. Additionally, remove the pin in `rustc_ast` to allow non-library crates to upgrade to the latest version. Link: rust-lang#127890 [1]
1 parent 194bbc7 commit 6d8f5d8

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

Cargo.lock

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

std/Cargo.toml

+4
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ unwind = { path = "../unwind" }
2323
hashbrown = { version = "0.14", default-features = false, features = [
2424
'rustc-dep-of-std',
2525
] }
26+
# FIXME(#127890): `object` depends on `memchr`, but `memchr` > v2.5 causes
27+
# issues with LTO. This dependency is not used directly, but pin it here so
28+
# it resolves to 2.5. To be removed once rust-lang/rust#127890 is fixed.
29+
memchr = { version = "=2.5.0", default-features = false, features = ["rustc-dep-of-std"] }
2630
std_detect = { path = "../stdarch/crates/std_detect", default-features = false, features = [
2731
'rustc-dep-of-std',
2832
] }

0 commit comments

Comments
 (0)