Bug 16264 - reproducible issue with rust optimizations - lto or parallel-frontend-threads
Summary: reproducible issue with rust optimizations - lto or parallel-frontend-threads
Status: NEW
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: devtools / tool chain (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 6.1 M2
Assignee: Sundeep Kokkonda
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2026-04-23 10:00 UTC by Sundeep Kokkonda
Modified: 2026-04-23 14:53 UTC (History)
4 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sundeep Kokkonda 2026-04-23 10:00:41 UTC
When enabled lto or parallel-frontend-threads optimizations rust binaries are not reproducible.

Build errors:
https://lists.openembedded.org/g/openembedded-core/message/233071

When parallel-frontend-threads is enabled the binaries are differed in librustc_driver***.so between rust-dbg_1.94.0-r0_amd64.deb & rust_1.94.0-r0_amd64.deb

The difference in librustc_driver***.so is in .gnu_debuglink section. Further analysis on debug data shows the .strtab section is differed and there found the debug symbols are generated with changed *.llvm.{hash} between the builds. For e.g.,

BuildA has: _RINvNtCskNcDw7Prru3_4core3ptr13drop_in_placeINtNtNtNtCsc9RSozNcmFu_3std4sync6poison5mutex10MutexGuarduEECsi7rQHRWG1Yr_12rustc_middle.llvm.12271321240562639378
BuildB has: _RINvNtCskNcDw7Prru3_4core3ptr13drop_in_placeINtNtNtNtCsc9RSozNcmFu_3std4sync6poison5mutex10MutexGuarduEECsi7rQHRWG1Yr_12rustc_middle.llvm.16648798016096118002

In above 2 lines the *.llvm.{hash} is changed.

The issue is raised with rust upstream - https://github.com/rust-lang/rust/issues/154259