Cosmin Apreutesei via llvm-dev
2019-Jun-20 09:00 UTC
[llvm-dev] 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!
Chris Bieneman via llvm-dev
2019-Jun-20 17:44 UTC
[llvm-dev] Build libclang.dll exporting C APIs for both Clang and LLVM
> On Jun 20, 2019, at 2:00 AM, Cosmin Apreutesei via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > 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> > Thanks! > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev