Ok. Concrete proposal: we put an LLVM bitcode section in the resulting
crate when compiling in shared mode, and use keyword 'inline'. Stick it
on a fn-or-iter, that fn-or-iter gets emitted in the .bc section of the
resulting crate and copied into the crates that use you rather than
externally referenced. Good enough?

I like it. It might also be a good idea to still emit an external copy so that llvm has the option (and not the obligation) to inline it.

At some point we might want to have a static crate format so that we can put it in there too, but that in an independent issue.

(also realize this ties out compilation artifacts to particular llvm
bitcode format changes; it is not actually a "stable" format)

I don't really want to get into multiple compilation artifacts if we can
avoid it.

-Graydon

Cheers,
Rafael
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to