[cfe-dev] Building Clang examples and running

Bruce Stephens bruce.r.stephens at gmail.com
Fri Jun 11 06:38:35 PDT 2010


Seth Burleigh <seth-12uWGSe1GEnQT0dZR+AlfA at public.gmane.org> writes:

> Im trying to get the printfn example to work. I go to director and do
> sudo make and then sudo make install, i then run
>
> clang -cc1 -load /usr/local/lib/libPrintFunctionNames.so   -plugin help
>
> and i get
> clang -cc1 plugins:
>
> which means there are no plugins, indeed when i to prin-fns instead of
> help, it says it cant find plugin.

I foung the same.  The only way I managed to get it to work was to
ignore configure and use cmake.  So, in another directory use "ccmake
<path-to-llvm-source>" (where ccmake is one of the frontends to cmake)
and turn on the CMAKE_BUILD_EXAMPLES option (and set
CMAKE_INSTALL_PREFIX if you want) then use make in that directory.
"make install" will also work.

On the downside, I haven't worked out how to produce API documentation,
whereas I could with the in-tree build.



More information about the cfe-dev mailing list