Skip to content

Include *.rmeta files in stdlib sysroot glob#3860

Open
redsun82 wants to merge 1 commit intobazelbuild:mainfrom
redsun82:fix-rmeta-sysroot-glob
Open

Include *.rmeta files in stdlib sysroot glob#3860
redsun82 wants to merge 1 commit intobazelbuild:mainfrom
redsun82:fix-rmeta-sysroot-glob

Conversation

@redsun82
Copy link

Starting around nightly 2026-01-22 (rustc 1.95.0-nightly), the Rust distribution ships stdlib .rlib files as ~440-byte metadata stubs, with full metadata in separate .rmeta files alongside them. The _build_file_for_stdlib_template glob only includes *.rlib, so the .rmeta files are excluded from the sysroot, causing error[E0786]: only metadata stub found errors.

This PR adds *.rmeta to the glob.

Fixes #3859

Starting around nightly 2026-01-22, the Rust distribution ships stdlib
.rlib files as metadata stubs, with the full metadata in separate .rmeta
files. Add *.rmeta to the _build_file_for_stdlib_template glob so these
files are included in the Bazel sysroot.

Fixes bazelbuild#3859
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Stdlib .rmeta files not included in sysroot glob, causing "only metadata stub found" errors with recent Rust nightlies

1 participant

Comments