-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
Put crate metadata first in rlibs whenever possible #93806
Copy link
Copy link
Closed
Labels
A-metadataArea: Crate metadataArea: Crate metadataI-compiletimeIssue: Problems and improvements with respect to compile times.Issue: Problems and improvements with respect to compile times.WG-compiler-performanceWorking group: Compiler PerformanceWorking group: Compiler Performance
Metadata
Metadata
Assignees
Labels
A-metadataArea: Crate metadataArea: Crate metadataI-compiletimeIssue: Problems and improvements with respect to compile times.Issue: Problems and improvements with respect to compile times.WG-compiler-performanceWorking group: Compiler PerformanceWorking group: Compiler Performance
Type
Fields
Give feedbackNo fields configured for issues without a type.
In the past rlib metadata had to be the last archive member as the linker stops at the first non-object member. The rlib metadata has somewhat recently been changed to be wrapped in an object file on most platforms, which allows it to be anywhere in the rlib. Putting it first would allow for quicker metadata reading as it would no longer be necessary to read the header of every archive member to find the crate metadata, only the first member header.