Announcement

Collapse
No announcement yet.

LLVM/Clang Can Build LibreOffice

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #11
    From personal experience, code I wrote that didn't compile with Clang was my own fault. Clang was right not to accept it and GCC was wrong. These are mostly corner cases that are very easy to get wrong when writing code. For example, I didn't know that const objects should not have a compiler-generated default constructor. GCC would generate one just fine. Clang wouldn't because the standard says that user is responsible for providing it. (GCC got fixed now, but only after Clang showed that this was an issue.)

    This is why I now mainly use Clang while developing (I run it through GCC and Intel C++ now and then for brevity though.) It helps in producing more correct code by refusing to compile wrong code. The error messages are also much clearer than GCC's, where you already need to know in advance what the error means by having encountered it before.
    Last edited by RealNC; 23 October 2011, 12:39 AM.

    Comment


    • #12
      I am sure someday Clang/LLVM will end up becoming the default compiler for the Linux kernel rather than GCC, once it matures. Even desktops like KDE/GNOME could be built with it as well as apps. If Clang does become the "wonder compiler" I am sure it'll become widely used

      Comment


      • #13
        Originally posted by rohcQaH View Post
        You may want to read the linked article. It's a valid binary, but it crashes during startup. Whether that's due to a bug in LLVM or a bug in LO (i.e. reliance on gcc specific behaviour) hasn't been researched yet.
        If the compiler doesn't throw errors and the binary fails to run the problem is most likely a bug in the compiler. Still, a while back LLVM/Clang couldn't even compile LibreOffice so there's definately been progress. I think this article should have been posted when it compiled and ran, I'll chalk it up to either Michael's overall entusiasm concerning LLVM/Clang or a lack of newsworthy material.

        Comment


        • #14
          Originally posted by yogi_berra View Post
          But can you end the mono-culture that exists around gcc that results in blog posts about patches that allow something else to build?
          What exactly are you referring to?

          Comment


          • #15
            Originally posted by RealNC View Post
            The error messages are also much clearer than GCC's, where you already need to know in advance what the error means by having encountered it before.
            Yes the error diagnostics are superior in Clang/LLVM, when it reaches a higher maturity/GCC compability I will most likely switch to it as my development compiler and use GCC primarily for performance/final builds as it generates faster code.

            Comment


            • #16
              Originally posted by XorEaxEax View Post
              If the compiler doesn't throw errors and the binary fails to run the problem is most likely a bug in the compiler.
              I think it's far more likely that LibreOffice invokes undefined or implementation-defined behaviour during startup, which is compiled in different ways by gcc and clang.

              Comment


              • #17
                Originally posted by AnonymousCoward View Post
                I think it's far more likely that LibreOffice invokes undefined or implementation-defined behaviour during startup, which is compiled in different ways by gcc and clang.
                A good suggestion is to get some feedback from the LO devs about this and maybe they can do some research to determine what went astray in the clang-compiled LO binary

                Comment


                • #18
                  Well, if I ever need a compiler that produces binaries that don't work but produces them faster with less memory usage, I'll remember clang.

                  Comment


                  • #19
                    Originally posted by DeepDayze View Post
                    I am sure someday Clang/LLVM will end up becoming the default compiler for the Linux kernel rather than GCC, once it matures. Even desktops like KDE/GNOME could be built with it as well as apps. If Clang does become the "wonder compiler" I am sure it'll become widely used
                    I wonder why people support Clang/llvm while there's Ekopath. It's probably more GCC compatible and beats cland/llvm in terms of performance badly. It also produces binaries that work. Btw. what do you mean by "wonder"?

                    Comment


                    • #20
                      I wouldn't trust anything that is under apple's hands and supervision (and generally most things that use a bsd license reek badly to me, but that's just a personal preference). Could be great software for all I care, but evil people have already achieved greatness in the past, that didn't cancel out their evilness though.

                      Still, ideally you should code against a standard, not against a compiler, just as you should design web pages against a standard and not against a browser.

                      Comment

                      Working...
                      X