On 16/05/2011 8:44 AM, Patrick Walton wrote:
Sorry, I should have been more clear. What I'm proposing is to segment the standard library into two parts: a small, performance-critical part that benefits from LTO and a larger, dynamically-linked part. This is what I was getting at by defending dynamic linking; there are parts of the standard library that we would definitely like to be able to share among processes, to be able to patch for security issues, and to avoid recompiling. But there would be a small core that would be shipped as a .bc file and linked at LLVM optimization time into Rust binaries. This allows us to alter the dividing line between static and dynamic over time.
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?
(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 _______________________________________________ Rust-dev mailing list [email protected] https://mail.mozilla.org/listinfo/rust-dev
