[LLVMdev] [cfe-dev] Living on Clang
Jean-Daniel Dupas
devlists at shadowlab.org
Mon Apr 19 03:05:24 PDT 2010
If this is a dual core, you may try
make -j2
to boost the build.
Le 19 avr. 2010 à 11:52, Diego Iastrubni a écrit :
> How about building this in the CMake or auto* level we build a separate build script for it? I attache a simple version here. It does seem to work here. It's a shell script, which uses cmake for the building but it seems the second stage file works. I am not really sure why a third stage is needed, but it can be added quite easily. A windows version should be trivial to write (next week).
>
> A few rants about clang:
> This is the first time I was able to bootstrap the whole compiler. Which is great, don't get me wrong. But it was painfully slow, and the CPU of my machine became *really* hot unlike with gcc. The whole building process took more then 4 hours on this old cual core machine, while stage one took an hour more or less (I need to do a test again, without ccache).
>
> [elcuco at pinky ~/src/llvm] ls bootstrap-stage-2/bin/ -ltr
> total 262708
> -rwxrwxr-x. 1 elcuco elcuco 5641794 2010-04-19 03:12 tblgen
> -rwxrwxr-x. 1 elcuco elcuco 985416 2010-04-19 04:41 FileCheck
> -rwxrwxr-x. 1 elcuco elcuco 6374 2010-04-19 04:41 count
> -rwxrwxr-x. 1 elcuco elcuco 122992 2010-04-19 04:41 not
> -rwxrwxr-x. 1 elcuco elcuco 24101 2010-04-19 05:34 llvm-config
> -rwxrwxr-x. 1 elcuco elcuco 18325933 2010-04-19 05:36 opt
> -rwxrwxr-x. 1 elcuco elcuco 7705301 2010-04-19 05:36 llvm-as
> -rwxrwxr-x. 1 elcuco elcuco 6671138 2010-04-19 05:36 llvm-dis
> -rwxrwxr-x. 1 elcuco elcuco 31626605 2010-04-19 05:37 llvm-mc
> -rwxrwxr-x. 1 elcuco elcuco 32630459 2010-04-19 05:38 llc
> -rwxrwxr-x. 1 elcuco elcuco 6814656 2010-04-19 05:38 llvm-ranlib
> -rwxrwxr-x. 1 elcuco elcuco 6875243 2010-04-19 05:38 llvm-ar
> -rwxrwxr-x. 1 elcuco elcuco 6827605 2010-04-19 05:38 llvm-nm
> -rwxrwxr-x. 1 elcuco elcuco 14608549 2010-04-19 05:39 llvm-ld
> -rwxrwxr-x. 1 elcuco elcuco 7506306 2010-04-19 05:39 llvm-prof
> -rwxrwxr-x. 1 elcuco elcuco 8310633 2010-04-19 05:39 llvm-link
> -rwxrwxr-x. 1 elcuco elcuco 25527057 2010-04-19 05:40 lli
> -rwxrwxr-x. 1 elcuco elcuco 8217315 2010-04-19 05:40 llvm-extract
> -rwxrwxr-x. 1 elcuco elcuco 18994379 2010-04-19 05:42 bugpoint
> -rwxrwxr-x. 1 elcuco elcuco 1011333 2010-04-19 05:43 llvm-bcanalyzer
> -rwxrwxr-x. 1 elcuco elcuco 6468 2010-04-19 05:43 llvm-stub
> -rwxrwxr-x. 1 elcuco elcuco 42747 2010-04-19 07:28 c-index-test
> -rwxrwxr-x. 1 elcuco elcuco 60447800 2010-04-19 07:29 clang
> lrwxrwxrwx. 1 elcuco elcuco 51 2010-04-19 07:29 clang++ -> /home/elcuco/src/llvm/bootstrap-stage-2/bin/./clang
>
>
> On Fri, Apr 16, 2010 at 12:27 AM, Lacey, Mark <mark.lacey at intel.com> wrote:
> > We want to make Clang great, and we need your help!
>
> Doug,
>
> I don't see any type of selfbuild target in the LLVM top level makefile.
> This would be a useful way to automate the self build process.
>
> I've used similar mechanisms before on other compilers, where you can
> trivially invoke a three phase build (first you do a full build with your
> system compiler, then you use your built compiler to do another full build,
> and then take that most recent build compiler to build yet again...). The
> build options of the last two phases are identical, and the object files
> from those last two passes are compared to ensure that they are identical.
>
> Ideally you can control the build options of the initial build and last two
> builds independently (e.g. build a compiler without optimizations and with
> assertions, and then do the last two builds with assertions disabled, and
> optimizations on) - I'm not sure how easy this is with the autoconfig based
> system LLVM/clang use, if at all.
>
> Mark
>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
>
> <bootstrap-clang.sh>_______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
-- Jean-Daniel
Le 19 avr. 2010 à 11:52, Diego Iastrubni a écrit :
> How about building this in the CMake or auto* level we build a separate build script for it? I attache a simple version here. It does seem to work here. It's a shell script, which uses cmake for the building but it seems the second stage file works. I am not really sure why a third stage is needed, but it can be added quite easily. A windows version should be trivial to write (next week).
>
> A few rants about clang:
> This is the first time I was able to bootstrap the whole compiler. Which is great, don't get me wrong. But it was painfully slow, and the CPU of my machine became *really* hot unlike with gcc. The whole building process took more then 4 hours on this old cual core machine, while stage one took an hour more or less (I need to do a test again, without ccache).
>
> [elcuco at pinky ~/src/llvm] ls bootstrap-stage-2/bin/ -ltr
> total 262708
> -rwxrwxr-x. 1 elcuco elcuco 5641794 2010-04-19 03:12 tblgen
> -rwxrwxr-x. 1 elcuco elcuco 985416 2010-04-19 04:41 FileCheck
> -rwxrwxr-x. 1 elcuco elcuco 6374 2010-04-19 04:41 count
> -rwxrwxr-x. 1 elcuco elcuco 122992 2010-04-19 04:41 not
> -rwxrwxr-x. 1 elcuco elcuco 24101 2010-04-19 05:34 llvm-config
> -rwxrwxr-x. 1 elcuco elcuco 18325933 2010-04-19 05:36 opt
> -rwxrwxr-x. 1 elcuco elcuco 7705301 2010-04-19 05:36 llvm-as
> -rwxrwxr-x. 1 elcuco elcuco 6671138 2010-04-19 05:36 llvm-dis
> -rwxrwxr-x. 1 elcuco elcuco 31626605 2010-04-19 05:37 llvm-mc
> -rwxrwxr-x. 1 elcuco elcuco 32630459 2010-04-19 05:38 llc
> -rwxrwxr-x. 1 elcuco elcuco 6814656 2010-04-19 05:38 llvm-ranlib
> -rwxrwxr-x. 1 elcuco elcuco 6875243 2010-04-19 05:38 llvm-ar
> -rwxrwxr-x. 1 elcuco elcuco 6827605 2010-04-19 05:38 llvm-nm
> -rwxrwxr-x. 1 elcuco elcuco 14608549 2010-04-19 05:39 llvm-ld
> -rwxrwxr-x. 1 elcuco elcuco 7506306 2010-04-19 05:39 llvm-prof
> -rwxrwxr-x. 1 elcuco elcuco 8310633 2010-04-19 05:39 llvm-link
> -rwxrwxr-x. 1 elcuco elcuco 25527057 2010-04-19 05:40 lli
> -rwxrwxr-x. 1 elcuco elcuco 8217315 2010-04-19 05:40 llvm-extract
> -rwxrwxr-x. 1 elcuco elcuco 18994379 2010-04-19 05:42 bugpoint
> -rwxrwxr-x. 1 elcuco elcuco 1011333 2010-04-19 05:43 llvm-bcanalyzer
> -rwxrwxr-x. 1 elcuco elcuco 6468 2010-04-19 05:43 llvm-stub
> -rwxrwxr-x. 1 elcuco elcuco 42747 2010-04-19 07:28 c-index-test
> -rwxrwxr-x. 1 elcuco elcuco 60447800 2010-04-19 07:29 clang
> lrwxrwxrwx. 1 elcuco elcuco 51 2010-04-19 07:29 clang++ -> /home/elcuco/src/llvm/bootstrap-stage-2/bin/./clang
>
>
> On Fri, Apr 16, 2010 at 12:27 AM, Lacey, Mark <mark.lacey at intel.com> wrote:
> > We want to make Clang great, and we need your help!
>
> Doug,
>
> I don't see any type of selfbuild target in the LLVM top level makefile.
> This would be a useful way to automate the self build process.
>
> I've used similar mechanisms before on other compilers, where you can
> trivially invoke a three phase build (first you do a full build with your
> system compiler, then you use your built compiler to do another full build,
> and then take that most recent build compiler to build yet again...). The
> build options of the last two phases are identical, and the object files
> from those last two passes are compared to ensure that they are identical.
>
> Ideally you can control the build options of the initial build and last two
> builds independently (e.g. build a compiler without optimizations and with
> assertions, and then do the last two builds with assertions disabled, and
> optimizations on) - I'm not sure how easy this is with the autoconfig based
> system LLVM/clang use, if at all.
>
> Mark
>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
>
> <bootstrap-clang.sh>_______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
-- Jean-Daniel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100419/23241ef6/attachment.html>
More information about the llvm-dev
mailing list