[LLVMdev] Practical --enable-shared LLVM builds.

Óscar Fuentes ofv at wanadoo.es
Wed Nov 12 18:02:14 PST 2008


"Scott Graham" <scott.llvm at h4ck3r.net> writes:

> I'm not sure that it meets your needs, but in making C# bindings[1], I
> had to build the one-big-dll with only public stuff exported. I did
> this by processing the llvm-c headers into a linker script (so the
> llvm-c interface is the determiner of what's visible, rather than
> requiring decoration in the source code).
>
> The llvm-c interface mostly only covers front end IR building, not
> code-gen or opt passes, but it might give you an idea of the ratio of
> public/internal anyway.

The llvm-c interface is quite limited, although very reasonable for some
applicatons. It is of little use to the LLVM developers, though.

> So, in the "LLVM user" category, yes, I'm interested in the
> one-big-dll, though I'd probably only use the C-interface, not the C++
> parts.

This seems easy to do. I'll investigate how much work requires to add a
target to the cmake build for putting together all the libs the user
requires into one dll, exporting the C API.

[snip]

> I'd also be interested in working on getting at the equivalent
> functionality of `llc' and `opt' via the llvm-c interface too, if you
> think that might be the way to go.

The problem here is that the C++ API changes quite often. If your C
wrappings are exhaustive, this can involve quite a bit of maintenance
work and be a good candidate for code rot.

[snip]

-- 
Oscar




More information about the llvm-dev mailing list