could libclang be made a runtime dependency?

René J.V. Bertin rjvbertin at
Mon Nov 20 14:28:45 UTC 2017


Out of curiosity, coming back to the dependency on libclang and what made me propose a build system mod that allows to build and install the clang parser plugin independently from the rest of the IDE:

Roughly speaking, how many functions from libclang and/or libLLVM are called directly by the kdevclangsupport and libKDevClangPrivate? Would it be feasible to do something akin to how Audacity depends on the FFMpeg libraries, i.e. load them dynamically from a configurable location and then import the required symbols? I understand that libclang is backwards ABI compatible so it's probably possible to build the plugin against, say, clang 6 and then use it with any recent enough libclang version provided that the plugin keeps track of which functions fail to import?

With such an approach it should be possible for the Mac versions to find and use the libclang shipped with Xcode but I think it could also be useful in other situations.


More information about the KDevelop-devel mailing list