[llvm-dev] Build libclang.dll exporting C APIs for both Clang and LLVM
Chris Bieneman via llvm-dev
llvm-dev at lists.llvm.org
Thu Jun 20 10:44:00 PDT 2019
> On Jun 20, 2019, at 2:00 AM, Cosmin Apreutesei via llvm-dev <llvm-dev at lists.llvm.org> wrote:
> I would like to use both LLVM and Clang C APIs via the runtime ffi of
> a scripting language.
> Is it possible to build a libclang.dll that embeds both llvm and clang
> and exports the Clang and LLVM C APIs (and no C++ symbols) using
Possible? Sure. Is this supported in the current build system? No.
> Did anyone tried that before?
Not that I'm aware of.
To do it you would basically need to grab the LLVM C export list that llvm/tools/llvm-shlib generates, and add that the the clang exports list that clang/tools/libclang contains. That would give you LLVM + libClang. If you need other Clang CAPIs you'd also need to build a mechanism for generating those export lists.
Totally possible, but not supported.
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
More information about the llvm-dev