Skip to content

Include *.rmeta files in stdlib sysroot glob#3860

Merged
krasimirgg merged 2 commits intobazelbuild:mainfrom
redsun82:fix-rmeta-sysroot-glob
Feb 23, 2026
Merged

Include *.rmeta files in stdlib sysroot glob#3860
krasimirgg merged 2 commits intobazelbuild:mainfrom
redsun82:fix-rmeta-sysroot-glob

Conversation

@redsun82
Copy link
Contributor

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
@krasimirgg krasimirgg self-requested a review February 23, 2026 09:33
Copy link
Collaborator

@krasimirgg krasimirgg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@krasimirgg krasimirgg enabled auto-merge February 23, 2026 09:33
@krasimirgg krasimirgg added this pull request to the merge queue Feb 23, 2026
Merged via the queue into bazelbuild:main with commit 5f633d2 Feb 23, 2026
2 checks passed
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

2 participants