[cfe-dev] clang-tools compilation confusion

Alexander Droste via cfe-dev cfe-dev at lists.llvm.org
Sun Aug 14 02:42:42 PDT 2016


Hi,

I think this should be really only about cloning clang-extras into
the right directory. clang-extras should be in: 'llvm/tools/clang/tools/extra'.
I attached a script which clones and builds LLVM with a list of subprojects.
Just comment out the ones you don't need.

-Alex

On 14.08.16 00:42, benjamin adamson via cfe-dev wrote:
> Hi, I hope this is an easy question. I've been stuck with this for longer than I
> care to admit, so I appreciate any help! I've been trying to setup a new C++
> project for myself, using all of the clang static analysis tools from the start.
> I was able to integrate clang-format and clang-check into my workflow no
> problem, but I'm unable to figure out how to compile the extra tools along-side
> with my llvm installation.
>
> I followed the steps verbatim from:
> http://clang.llvm.org/get_started.html
>
> Specifically the step asking us to checkout the extra repository, and then build
> the whole project.
>
>  benjamin at benjamin-HP-Compaq-8200-Elite-SFF-PC  ~/github/build-llvm  pwd
> /home/benjamin/github/build-llvm
>
> cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release ../llvm/
>
> This works find, produces a release build of the clang compiler. However, the
> clang extra tools (such as clang-tidy) are not found in the bin directory. I
> noticed that clang-tidy came with a python script to run it, which I did, which
> failed because (I believe) clang-apply-replacements isn't in my path.
>
> So I went and looked for clang-apply-replacements, and I couldn't find a python
> script fronting that, so I figure I need to understand why my
> clang-apply-replacements binary isn't being compiled when I build llvm/clang.
>
> Here's the directory structure of my llvm directory, if that's at all helpful:
> http://pastebin.com/xBBpAKUn
>
> Thanks in advance, I'm super excited about using these tools but the
> documentation around installing the extra tools is missing a bit of hand-holding
> I believe. I could be wrong, thanks in advance!!
>
>
> --
> Adamson, Benjamin
> adamson.benjamin at gmail.com <mailto:adamson.benjamin at gmail.com>
>
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: setup_llvm.sh
Type: application/x-sh
Size: 1427 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20160814/3da855a9/attachment-0001.sh>


More information about the cfe-dev mailing list