meson and swipl-ld #14962
-
Hi all! I'm trying to set up a C++/Prolog project using meson. Sadly meson is telling me that it doesn't know the compiler (swipl-ld) that I'm trying to use. This compiler is just a wrapper around gcc and other common tools that is needed to automate some operations needed to call Prolog inside my C++ application. Is there a way to pass this phase or I'd need to add this compiler to the meson's known compilers here? Console output
Log
meson-swipl.ini
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
The reason meson needs to correctly detect the compiler is precisely because swi-ld is a wrapper that doesn't expose the same interface as a real GCC compiler. Per your link, you need to pass GCC options via |
Beta Was this translation helpful? Give feedback.
Not sure.
The easiest mechanism for allowing this sort of code generation wrapping tool, is probably if the tool supports a mode whereby it generates the code (e.g. an object file) specific to that ecosystem, and allows you to drive the compilation and linking yourself. For example, swig is pretty easy to use from meson as a custom target that outputs a C/C++ wrapper file for whatever language you want to generate a binding for.
On the other side of things, gnome has the gobject introspection scanner and compiler, which is implemented as a custom meson module. Meson needs to detect a C compiler, then passes the path to that compiler (and also passes CFLAGS) as a special argument to the in…