[cfe-dev] Clang Python bindings missing from installation ?

Gordon McConnell via cfe-dev cfe-dev at lists.llvm.org
Wed Jan 15 16:52:35 PST 2020


Hi Clang experts,

We already use clang to build our code, but would now additionally like to make use of clang's python bindings to write some custom python scripts to check certain aspects of our C++ code.

Problem is, that my clang/llvm 7.1.0 installations do not contain the necessary files for this.  The download of sources for my builds of clang DO contain the necessary files - under   <SRC_TOP>/llvm/tools/clang/bindings/python/clang/  I have:
__init__.py
cindex.py
enumerations.py
but when the build and install steps are done, these files do not get carried over to the installation DESTDIR

I've spent a while looking to see whether there is some configuration setting that needs to be done at the cmake level, to get the content copied over from the download location, to the installation. Nothing found. (I see ways to control whether bindings for Go / OCaml should be enabled / disabled, but nothing for Python).

Can one of you please advise what the correct way is to get the bindings included in the installation ?  e.g.

  *   is there a "-D<setting>=<value>" option that I should be passing to cmake ?
  *   or should I perhaps be manually updating one of the CMakeLists.txt files somehow ?
  *   or should I simply manually copy the above files to somewhere under the installation DESTDIR after the fact ? (If so, is there a recommended location ?)

Thanks a lot for any light you can shed here.

Regards,
    Gordon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20200116/7fd157dd/attachment.html>


More information about the cfe-dev mailing list