Build libclang.dll exporting C APIs for both Clang and LLVM

Hi,

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
mingw64?

Did anyone tried that before?

Thanks!

Hi,

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
mingw64?

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.

-Chris