[cfe-dev] Too much time to compile clang. Suggestions for a starter?

rNoz via cfe-dev cfe-dev at lists.llvm.org
Sat Oct 21 02:11:10 PDT 2017


I would like to start "touching" a bit the code, trying to create some
functionalities, but I have no idea where to start, and I will need many
trials/tests...

So, one thing I was expecting is fast times to try (Modify-Compile-Run).

I did:

make clang
and it needed like 3-4 hours. I am ok with that.

Then, I add some "stupid" statement like 'int a = 3;' somewhere in
llvm/tools/clang/lib/Frontend/Rewrite/FixItRewriter.cpp
(FixitRewriter::Diag), and it needed:
- *6.57s. to compile the target ('make clangRewriteFrontend').*
- *4min 36.36s to link and build clang (`make clang`).*
In both cases it spends almost all the time* linking* (first to a static
lib, then to the clang binary itself).

This is really a lot of time to try bit a bit without knowledge of the
whole clang, compiling process, etc. Waiting up to is just really time
consuming.

What would you do to try the modifications faster?

Any recomendation/blog/guide to follow as a starter trying to modify a
bit the codebase of clang?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20171021/0aca43a6/attachment.html>


More information about the cfe-dev mailing list