[llvm-dev] A "Cross-Platform Runtime Library API" in LLVM IR
Lorenzo Laneve via llvm-dev
llvm-dev at lists.llvm.org
Mon May 23 04:35:29 PDT 2016
You guys are saying that the library which defines the runtime library is written in C for many languages.
The problem is that such functions are in the libc and so the object files have to be linked against the **entire** libc.
Sorry if I'm wrong but isn't it a little inefficient or hard to handle?
With "hard to handle" I mean the entry point:
if I use C's I/O operations, ain't I forced to use the C _start() implementation that calls its initializers (such as stdin and stdout initialization) before calling main() ?
I was thinking about maybe trying to make the languages runtimes independent from the C runtime. Wouldn't it make runtimes faster?
> On May 23, 2016, at 1:19 PM, David Chisnall <David.Chisnall at cl.cam.ac.uk> wrote:
>> On 23 May 2016, at 12:16, Lorenzo Laneve <lore97drk at icloud.com> wrote:
>> I'm not talking about a new library instead of the libc, I'm talking about letting people create a library optimized for a specific frontend, regardless of the target.
> It sounded as if you were talking about a library that sits underneath such a thing. Lots of languages have their own runtime libraries (I maintain two of them), including Go, C++, Swift, and Objective-C. These are generally intended to be portable across front ends, defining the low-level binary interfaces that compilers target.
More information about the llvm-dev