Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--emit=[asm|llvm-bc|llvm-ir|obj] not emitting allocator or metadata #67292

Open
0dvictor opened this issue Dec 14, 2019 · 2 comments
Open

--emit=[asm|llvm-bc|llvm-ir|obj] not emitting allocator or metadata #67292

0dvictor opened this issue Dec 14, 2019 · 2 comments
Labels
A-codegen Area: Code generation A-metadata Area: Crate metadata C-feature-request Category: A feature request, i.e: not implemented / a PR. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@0dvictor
Copy link
Contributor

0dvictor commented Dec 14, 2019

At present, rustc --emit=[asm|llvm-bc|llvm-ir|obj] only generates artifacts of the regular module but not allocators or metadata.

While working on #64191 , I found such behavior was very confusing as I expected it to output all artifacts I need to generate the final binary. Therefore, I am proposing to make rustc --emit=[asm|llvm-bc|llvm-ir|obj] emits allocators and metadata, in addition to the regular module. For example:

  • rustc --emit=llvm-bc foo.rs would outputs foo.bc and foo.allocator.bc [crate-type bin doesn't need metadata]
  • rustc --emit=llvm-ir foo.rs --crate-type=dylib would outputs foo.ll, foo.allocator.ll, and foo.metadata.ll
@0dvictor 0dvictor changed the title --emit [asm|llvm-bc|llvm-ir|obj] not emitting allocator or metadata --emit=[asm|llvm-bc|llvm-ir|obj] not emitting allocator or metadata Dec 14, 2019
@jonas-schievink jonas-schievink added A-codegen Area: Code generation C-bug Category: This is a bug. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. A-metadata Area: Crate metadata labels Dec 14, 2019
@workingjubilee workingjubilee added C-feature-request Category: A feature request, i.e: not implemented / a PR. and removed C-bug Category: This is a bug. labels Jul 6, 2022
@workingjubilee
Copy link
Member

Hmm. I don't believe we use a special allocator anymore...?

@bjorn3
Copy link
Member

bjorn3 commented Jul 19, 2022

OP is refering to the allocator shim, which we still use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-codegen Area: Code generation A-metadata Area: Crate metadata C-feature-request Category: A feature request, i.e: not implemented / a PR. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

4 participants