Living on Clang

classic Classic list List threaded Threaded
18 messages Options
Reply | Threaded
Open this post in threaded view
|

Living on Clang

Douglas Gregor
Hello fellow LLVMers and Clangstas,

We want to make Clang great, and we need your help!

Helping is easy: just build Clang on your platform and start using it as your main compiler for LLVM and Clang development. Much of the Clang team has been living on Clang for at least several weeks already, and we've found it to be quite stable for development. If you run into problems---poor diagnostics, poor debugging experience, compiler crashes, rejecting valid code, whatever---please file Bugzillas so we can get them fixed.

Steps to living on Clang:

  - Make sure you're getting a good revision of Clang/LLVM from Subversion by checking the Buildbots (http://google1.osuosl.org:8011/console). The clang-*-selfhost builds have passed self-host + testing and are good candidates.

  - Build Clang as part of LLVM (http://clang.llvm.org/get_started.html). I suggest a Release build, since Debug builds tend to be very slow.

  - Install Clang + LLVM somewhere that isn't where you do your normal LLVM/Clang development.

  - Configure with the environment variables CC=/path/to/clang CXX=/path/to/clang++, which works with either autoconf configure or CMake cmake/ccmake.

  - Build LLVM and Clang as normal.

  - Report your experiences to help us improve Clang!

        - Doug



_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: Living on Clang

Seo Sanghyeon-3
2010/4/15 Douglas Gregor <[hidden email]>:
>  - Report your experiences to help us improve Clang!

I switched to Clang, and I got 49 new unexpected failures on Linux. Is
this normal? (New, as in, there were no unexpected failures when
compiled the same source with GCC.)

--
Seo Sanghyeon

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: Living on Clang

Rene Rebe
In reply to this post by Douglas Gregor
Hi,

On Apr 14, 2010, at 10:51 PM, Douglas Gregor wrote:

> Hello fellow LLVMers and Clangstas,
>
> We want to make Clang great, and we need your help!
>
> Helping is easy: just build Clang on your platform and start using it as your main compiler for LLVM and Clang development. Much of the Clang team has been living on Clang for at least several weeks already, and we've found it to be quite stable for development. If you run into problems---poor diagnostics, poor debugging experience, compiler crashes, rejecting valid code, whatever---please file Bugzillas so we can get them fixed.

Been there, done that: http://rene.rebe.de/2010-02-16/llvm-clang-support-in-t2-sde-linux/

And reported C++ issues spotted while at it. I plan to further extend the testing and potentially default to Clang (without GCC) in a future T2 Linux revision.

> Steps to living on Clang:
>
>  - Make sure you're getting a good revision of Clang/LLVM from Subversion by checking the Buildbots (http://google1.osuosl.org:8011/console). The clang-*-selfhost builds have passed self-host + testing and are good candidates.
>
>  - Build Clang as part of LLVM (http://clang.llvm.org/get_started.html). I suggest a Release build, since Debug builds tend to be very slow.
>
>  - Install Clang + LLVM somewhere that isn't where you do your normal LLVM/Clang development.
>
>  - Configure with the environment variables CC=/path/to/clang CXX=/path/to/clang++, which works with either autoconf configure or CMake cmake/ccmake.
>
>  - Build LLVM and Clang as normal.
>
>  - Report your experiences to help us improve Clang!
>
> - Doug

--
  René Rebe, ExactCODE GmbH, Jaegerstr. 67, DE-10117 Berlin
  http://exactcode.com | http://t2-project.org | http://rene.rebe.de


_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: Living on Clang

Douglas Gregor
In reply to this post by Seo Sanghyeon-3

On Apr 14, 2010, at 7:23 PM, Seo Sanghyeon wrote:

> 2010/4/15 Douglas Gregor <[hidden email]>:
>>  - Report your experiences to help us improve Clang!
>
> I switched to Clang, and I got 49 new unexpected failures on Linux. Is
> this normal? (New, as in, there were no unexpected failures when
> compiled the same source with GCC.)


This is not normal. It may be a symptom of

        http://llvm.org/bugs/show_bug.cgi?id=6795

It looks like we still need some help tracking down problems on Linux; we're not seeing any of these failures on Mac OS X.

        - Doug
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: [LLVMdev] Living on Clang

Kenneth Uildriks
In reply to this post by Rene Rebe
I can't switch to clang on my project until it can handle boost headers.

On Thu, Apr 15, 2010 at 2:17 AM, Rene Rebe <[hidden email]> wrote:

> Hi,
>
> On Apr 14, 2010, at 10:51 PM, Douglas Gregor wrote:
>
>> Hello fellow LLVMers and Clangstas,
>>
>> We want to make Clang great, and we need your help!
>>
>> Helping is easy: just build Clang on your platform and start using it as your main compiler for LLVM and Clang development. Much of the Clang team has been living on Clang for at least several weeks already, and we've found it to be quite stable for development. If you run into problems---poor diagnostics, poor debugging experience, compiler crashes, rejecting valid code, whatever---please file Bugzillas so we can get them fixed.
>
> Been there, done that: http://rene.rebe.de/2010-02-16/llvm-clang-support-in-t2-sde-linux/
>
> And reported C++ issues spotted while at it. I plan to further extend the testing and potentially default to Clang (without GCC) in a future T2 Linux revision.
>
>> Steps to living on Clang:
>>
>>  - Make sure you're getting a good revision of Clang/LLVM from Subversion by checking the Buildbots (http://google1.osuosl.org:8011/console). The clang-*-selfhost builds have passed self-host + testing and are good candidates.
>>
>>  - Build Clang as part of LLVM (http://clang.llvm.org/get_started.html). I suggest a Release build, since Debug builds tend to be very slow.
>>
>>  - Install Clang + LLVM somewhere that isn't where you do your normal LLVM/Clang development.
>>
>>  - Configure with the environment variables CC=/path/to/clang CXX=/path/to/clang++, which works with either autoconf configure or CMake cmake/ccmake.
>>
>>  - Build LLVM and Clang as normal.
>>
>>  - Report your experiences to help us improve Clang!
>>
>>       - Doug
>
> --
>  René Rebe, ExactCODE GmbH, Jaegerstr. 67, DE-10117 Berlin
>  http://exactcode.com | http://t2-project.org | http://rene.rebe.de
>
>
> _______________________________________________
> LLVM Developers mailing list
> [hidden email]         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: [LLVMdev] Living on Clang

Douglas Gregor

On Apr 15, 2010, at 7:32 AM, Kenneth Uildriks wrote:

> I can't switch to clang on my project until it can handle boost headers.

The intent of using Clang for LLVM & Clang development is that we can improve compiler quality (diagnostics, debugging, etc.) on a code base where Clang works reasonably well already.

For other code bases, we're likely to have more basic problems---rejecting valid code, complaining about ill-formed code that GCC accepts, horrid miscompilations, etc.---so we get a different kind of feedback. For Boost specifically, we have a tracking bug (http://llvm.org/bugs/show_bug.cgi?id=6023) and are interested in reduced problems that show up in Boost libraries [*].

        - Doug

[*] Actually, we're *particularly* interested in Boost since there will be a Clang talk at BoostCon this year. Check it out at  http://www.boostcon.com/home .

> On Thu, Apr 15, 2010 at 2:17 AM, Rene Rebe <[hidden email]> wrote:
>> Hi,
>>
>> On Apr 14, 2010, at 10:51 PM, Douglas Gregor wrote:
>>
>>> Hello fellow LLVMers and Clangstas,
>>>
>>> We want to make Clang great, and we need your help!
>>>
>>> Helping is easy: just build Clang on your platform and start using it as your main compiler for LLVM and Clang development. Much of the Clang team has been living on Clang for at least several weeks already, and we've found it to be quite stable for development. If you run into problems---poor diagnostics, poor debugging experience, compiler crashes, rejecting valid code, whatever---please file Bugzillas so we can get them fixed.
>>
>> Been there, done that: http://rene.rebe.de/2010-02-16/llvm-clang-support-in-t2-sde-linux/
>>
>> And reported C++ issues spotted while at it. I plan to further extend the testing and potentially default to Clang (without GCC) in a future T2 Linux revision.
>>
>>> Steps to living on Clang:
>>>
>>>  - Make sure you're getting a good revision of Clang/LLVM from Subversion by checking the Buildbots (http://google1.osuosl.org:8011/console). The clang-*-selfhost builds have passed self-host + testing and are good candidates.
>>>
>>>  - Build Clang as part of LLVM (http://clang.llvm.org/get_started.html). I suggest a Release build, since Debug builds tend to be very slow.
>>>
>>>  - Install Clang + LLVM somewhere that isn't where you do your normal LLVM/Clang development.
>>>
>>>  - Configure with the environment variables CC=/path/to/clang CXX=/path/to/clang++, which works with either autoconf configure or CMake cmake/ccmake.
>>>
>>>  - Build LLVM and Clang as normal.
>>>
>>>  - Report your experiences to help us improve Clang!
>>>
>>>       - Doug
>>
>> --
>>  René Rebe, ExactCODE GmbH, Jaegerstr. 67, DE-10117 Berlin
>>  http://exactcode.com | http://t2-project.org | http://rene.rebe.de
>>
>>
>> _______________________________________________
>> LLVM Developers mailing list
>> [hidden email]         http://llvm.cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>>


_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: Living on Clang

David Chisnall-2
In reply to this post by Douglas Gregor
On 14 Apr 2010, at 21:51, Douglas Gregor wrote:

> Helping is easy: just build Clang on your platform and start using it as your main compiler for LLVM and Clang development


I never bother installing clang - I just add the build location to my path, which saves some time and disk space.  Unfortunately, this makes it impossible to build clang with clang, because it's replacing the libraries and executable while building.  

Would it be possible for the LLVM / Clang makefiles to build these files with a temporary name and then move them over the originals when the build process is finished?  This would make it much easier to live on clang.

I also had problems last time I tried building LLVM with clang - apparently the makefiles were not respecting the CXX environment variable, so you need a complete reconfigure, which is incredibly irritating.  With other projects I test with GCC and clang just by doing:

$ gmake CC=clang
$ gmake clean
$ gmake CC=gcc

David

-- Sent from my STANTEC-ZEBRA


_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: Living on Clang

Douglas Gregor

On Apr 15, 2010, at 8:04 AM, David Chisnall wrote:

> On 14 Apr 2010, at 21:51, Douglas Gregor wrote:
>
>> Helping is easy: just build Clang on your platform and start using it as your main compiler for LLVM and Clang development
>
>
> I never bother installing clang - I just add the build location to my path, which saves some time and disk space.  Unfortunately, this makes it impossible to build clang with clang, because it's replacing the libraries and executable while building.  

I suggest keeping a separate Clang-built-Clang that you live on, and update periodically to known-good revisions. Otherwise, you're likely to end up with a broken host compiler when something goes wrong on the trunk, which is a complete waste of time. Personally, I update my host Clang each morning to a version that has passed self-host + test.

> Would it be possible for the LLVM / Clang makefiles to build these files with a temporary name and then move them over the originals when the build process is finished?  This would make it much easier to live on clang.

A top level "bootstrap" target would address this issue better. I'd be opposed to having the normal build create temporary compilers that get moved over the originals, because that's more build-system ugliness to confuse IDEs and users alike.

> I also had problems last time I tried building LLVM with clang - apparently the makefiles were not respecting the CXX environment variable, so you need a complete reconfigure, which is incredibly irritating.  With other projects I test with GCC and clang just by doing:
>
> $ gmake CC=clang
> $ gmake clean
> $ gmake CC=gcc


gmake CXX=clang++ CC=clang

should work fine with the normal makefiles.

        - Doug
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: [LLVMdev] Living on Clang

Lacey, Mark
In reply to this post by Douglas Gregor
> 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


_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev

smime.p7s (11K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [LLVMdev] Living on Clang

Douglas Gregor

On Apr 15, 2010, at 2:27 PM, Lacey, Mark 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.

Yes, we would love to have this, but nobody has taken the time to write the Makefile/CMake magic to make it happen.

        - Doug
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: [LLVMdev] Living on Clang

Diego Iastrubni
In reply to this post by Lacey, Mark
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@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 <[hidden email]> 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
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev



_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev

bootstrap-clang.sh (508 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [LLVMdev] Living on Clang

Óscar Fuentes
Diego Iastrubni <[hidden email]>
writes:

> How about building this in the CMake or auto* level we build a separate
> build script for it?

I was thinking along the same lines, although a cmake script will do
too, the only tricky point being the special syntax required for
executing 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.

The third stage is for comparing the output of clang (as compiled by
gcc) against clang (as compiled by clang). The whole process is:

Stage 1: build clang with gcc

Stage 2: build clang with the clang created by gcc

Stage 3: build clang with the clang created by clang.

Final test: compare the object files geneated on Stage 2 with the object
files generated on Stage 3.

The last step is useful for detecting bugs on clang (and on gcc).

> A windows version should be trivial to write (next week).

Comparing the object files on Windows may be tricky, because IIRC they
contain timestamps.

> 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).

Building llvm+clang requires less than 10 minutes here with an Intel
Q6600, Linux x86_64.

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: [LLVMdev] Living on Clang

Lacey, Mark
> > A windows version should be trivial to write (next week).
>
> Comparing the object files on Windows may be tricky, because IIRC they
> contain timestamps.

This could be worked around by adding a hack (enabled by command-line
options of various tools) to zero out the time/date stamp in the MS COFF
header.

Mark


_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev

smime.p7s (11K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [LLVMdev] Living on Clang

Douglas Gregor
In reply to this post by Diego Iastrubni

On Apr 19, 2010, at 2:52 AM, Diego Iastrubni wrote:

> 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).

We can do this with a script, although it would be more convenient if it were a part of the build system itself. Regarding the script itself...

mkdir -p bootstrap-stage-1
cd    bootstrap-stage-1
cmake -DVARIABLE:CMAKE_BUILD_TYPE=release ../
make VERBOSE=1
cd ..

Your CMake command-line syntax is wrong. To set CMAKE_BUILD_TYPE to Release, use

cmake -DCMAKE_BUILD_TYPE:STRING=Release ../

> 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).

That's what happens when you use an unoptimized Clang to build Clang :) Your mis-typed setting of CMAKE_BUILD_TYPE meant that the first stage built a debug Clang. I'm sure things will go better when you turn optimization on.

        - Doug
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: Living on Clang

John Freeman
In reply to this post by Douglas Gregor
On 4/14/2010 3:51 PM, Douglas Gregor wrote:
> Helping is easy: just build Clang on your platform and start using it as your main compiler for LLVM and Clang development.

I took your suggestion, and it's worked out pretty well so far.

I did not quite understand how to add my own system header paths to the
hard-coded paths in clang/lib/Frontend/InitHeaderSearch.cpp (my attempt
failed to solve the problem), so I ended up having to create a link from
/usr/include/stdarg.h to
/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stdarg.h so that
<iostream> would compile.

In my latest small project (51 headers, 14 sources so far), Clang was
able to compile every source, some of which included templates, except
for the ones that instantiated
boost::uuids::string_generator::operator() (Boost.Uuid is a new library
in version 1.42). However, GCC was able to compile those sources and
successfully link the resulting objects with the Clang-built objects.

Knowing where Clang has come from, I am impressed with the progress! I'm
looking forward to the day I can completely switch over. :)

- John
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: Living on Clang

Douglas Gregor

On Apr 29, 2010, at 12:10 PM, John Freeman wrote:

> On 4/14/2010 3:51 PM, Douglas Gregor wrote:
>> Helping is easy: just build Clang on your platform and start using it as your main compiler for LLVM and Clang development.
>
> I took your suggestion, and it's worked out pretty well so far.
>
> I did not quite understand how to add my own system header paths to the
> hard-coded paths in clang/lib/Frontend/InitHeaderSearch.cpp (my attempt
> failed to solve the problem), so I ended up having to create a link from
> /usr/include/stdarg.h to
> /usr/lib/gcc/i686-apple-darwin9/4.0.1/include/stdarg.h so that
> <iostream> would compile.
>
> In my latest small project (51 headers, 14 sources so far), Clang was
> able to compile every source, some of which included templates, except
> for the ones that instantiated
> boost::uuids::string_generator::operator() (Boost.Uuid is a new library
> in version 1.42).

Hrm. The Boost.UUID tests are passing using Boost from trunk (and yesterday's Clang from trunk). Did you file a bug about the failure you're seeing?

        - Doug
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: [LLVMdev] Living on Clang

Diego Iastrubni
In reply to this post by Óscar Fuentes
On Mon, Apr 19, 2010 at 4:52 PM, Óscar Fuentes <[hidden email]> wrote:
The third stage is for comparing the output of clang (as compiled by
gcc) against clang (as compiled by clang). The whole process is:

Stage 1: build clang with gcc

Stage 2: build clang with the clang created by gcc

Stage 3: build clang with the clang created by clang.

Final test: compare the object files geneated on Stage 2 with the object
files generated on Stage 3.

This is the first time stage3 has been built, I am happy (up until now, stage3 was failing at the first compilation):

[elcuco@pinky ~/src/llvm] ls -l bootstrap-stage-*/bin/clang
-rwxrwxr-x. 1 elcuco elcuco 23594232 2010-05-06 22:56 bootstrap-stage-1/bin/clang
-rwxrwxr-x. 1 elcuco elcuco 24391566 2010-05-06 23:10 bootstrap-stage-2/bin/clang
-rwxrwxr-x. 1 elcuco elcuco 24395343 2010-05-06 23:32 bootstrap-stage-3/bin/clang


I already know that stage2 and stage3 are different, which means something is not really working. Does anyone have a clue about this? Is this a known issue, or should I report this?

Now lets test if bash compiles.

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: [LLVMdev] Living on Clang

Douglas Gregor

On May 6, 2010, at 2:19 PM, Diego Iastrubni wrote:

On Mon, Apr 19, 2010 at 4:52 PM, Óscar Fuentes <[hidden email]> wrote:
The third stage is for comparing the output of clang (as compiled by
gcc) against clang (as compiled by clang). The whole process is:

Stage 1: build clang with gcc

Stage 2: build clang with the clang created by gcc

Stage 3: build clang with the clang created by clang.

Final test: compare the object files geneated on Stage 2 with the object
files generated on Stage 3.

This is the first time stage3 has been built, I am happy (up until now, stage3 was failing at the first compilation):

[elcuco@pinky ~/src/llvm] ls -l bootstrap-stage-*/bin/clang
-rwxrwxr-x. 1 elcuco elcuco 23594232 2010-05-06 22:56 bootstrap-stage-1/bin/clang
-rwxrwxr-x. 1 elcuco elcuco 24391566 2010-05-06 23:10 bootstrap-stage-2/bin/clang
-rwxrwxr-x. 1 elcuco elcuco 24395343 2010-05-06 23:32 bootstrap-stage-3/bin/clang


I already know that stage2 and stage3 are different, which means something is not really working. Does anyone have a clue about this? Is this a known issue, or should I report this?

It's known that we differ, but nobody has investigated why. Please go ahead and file a Bugzilla.

- Doug

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev