Skip to content

Add in memory object files support to CompiledModule and ArchiveBuilder #69946

Open
@bjorn3

Description

@bjorn3

https://doc.rust-lang.org/nightly/nightly-rustc/rustc_codegen_ssa/struct.CompiledModule.html

https://doc.rust-lang.org/nightly/nightly-rustc/rustc_codegen_ssa/back/archive/trait.ArchiveBuilder.html

rustc_codegen_cranelift can emit object files to memory without writing them to the disk. With the current setup they need to be written to the disk before an rlib can be created. This doubles the amount of data written to the disk compared to emitting the object files to memory and then creating an rlib file from that. Linking a dylib or executable will still need to write the object files to the disk, but at least rlibs don't have to anymore.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-codegenArea: Code generationA-craneliftThings relevant to the [future] cranelift backendC-enhancementCategory: An issue proposing an enhancement or a PR with one.I-compiletimeIssue: Problems and improvements with respect to compile times.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions