Announcement

Collapse
No announcement yet.

LLVM Developers Bring Up Using C++11, Again

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

  • LLVM Developers Bring Up Using C++11, Again

    Phoronix: LLVM Developers Bring Up Using C++11, Again

    LLVM developers are once again bringing up the topic of whether their compiler infrastructure and Clang C/C++ front-end can utilize C++11 code...

    Phoronix, Linux Hardware Reviews, Linux hardware benchmarks, Linux server benchmarks, Linux benchmarking, Desktop Linux, Linux performance, Open Source graphics, Linux How To, Ubuntu benchmarks, Ubuntu hardware, Phoronix Test Suite

  • #2
    I think they should just start out with a limited subset of C++11, and expand that subset with each new LLVM release. They could also use some #ifdef's for C++11 things for the time being.

    Comment


    • #3
      The auto range based for loops could help a lot against errors.

      Comment


      • #4
        3-stage build?

        Why not provide an automated 3-stage build for legacy compilers? Like:
        1. compile "old" version of LLVM/Clang, that does not contain c++11 but can compile it - with legacy compiler
        2. compile current LLVM/Clang with that old LLVM/Clang
        3. compile current LLVM with itself
        done, problem solved.

        Comment


        • #5
          Originally posted by emerge-e-world View Post
          Why not provide an automated 3-stage build for legacy compilers? Like:
          1. compile "old" version of LLVM/Clang, that does not contain c++11 but can compile it - with legacy compiler
          2. compile current LLVM/Clang with that old LLVM/Clang
          3. compile current LLVM with itself
          done, problem solved.
          That is not the problem they have.

          Comment


          • #6
            Originally posted by emerge-e-world View Post
            Why not provide an automated 3-stage build for legacy compilers? Like:
            1. compile "old" version of LLVM/Clang, that does not contain c++11 but can compile it - with legacy compiler
            2. compile current LLVM/Clang with that old LLVM/Clang
            3. compile current LLVM with itself
            done, problem solved.
            Aside from not really solving all the problems on Windows... you want every copy of LLVM to double in size so that you can bootstrap from source?

            The real problems is that even new versions of LLVM/Clang can't self-host on Windows when built with MSVC yet, and building with MingW does not produce generally reusable libraries (remember, LLVM/Clang are _libraries_ first and tools second; that's half the reason everyone is slowly migrating to Clang and leaving the monolithic "reusable libraries over RMS' dead body" GCC). Sticking to an old fork is not going to help here. The only option is to improve LLVM, make new releases, and stick what the platform's native compiler support. They've had to stick to the even older GCC 4.2 for longer due to certain non-Windows platforms, too, though they're about to remove those platforms as supported "out of the box.'

            Comment


            • #7
              Originally posted by elanthis View Post
              Aside from not really solving all the problems on Windows... you want every copy of LLVM to double in size so that you can bootstrap from source?'
              No, not neccessarily. You could have simple script or a Makefile target that fetches the older tree and does the the staged compile job.

              But I see your point with compiling on windows as beeing a little more tricky. Haven't done that in a long time, good to know that it is still that messy. I did not expect that.

              Out of curiosity: What exactly does it mean that LLVM can't "self host" on windows without MSVC? You can't compile LLVM with itself after it is compiled with MSVC? And if so, why? Are there certain parts of it that cannot be compiled yet and need to fall back to MSVC or does it use some libraries of MSVC instead?

              Comment


              • #8
                Originally posted by MWisBest View Post
                I think they should just start out with a limited subset of C++11, and expand that subset with each new LLVM release. They could also use some #ifdef's for C++11 things for the time being.
                WebKit2 is one of the proponents and rightly so of accelerating C++11/C++14 adoption.

                Seeing as Clang defaults to C99 the C03/11 adoption will be a breeze compared to the C++11 acceleration.

                By LLVM/Clang 3.5 anyone not already migrating to C++11 will be SOL.

                Comment


                • #9
                  Originally posted by emerge-e-world View Post
                  No, not neccessarily. You could have simple script or a Makefile target that fetches the older tree and does the the staged compile job.

                  But I see your point with compiling on windows as beeing a little more tricky. Haven't done that in a long time, good to know that it is still that messy. I did not expect that.

                  Out of curiosity: What exactly does it mean that LLVM can't "self host" on windows without MSVC? You can't compile LLVM with itself after it is compiled with MSVC? And if so, why? Are there certain parts of it that cannot be compiled yet and need to fall back to MSVC or does it use some libraries of MSVC instead?
                  The Microsoft ABI support isn't complete and nor should it be. Quite frankly, LLVM/Clang's project isn't focused on making Microsoft's platform best of breed.

                  The VS2012 is the target from the latest discussion and whatever necessary ABI support needed to build LLVM to be leveraged within VS2012 should be something Microsoft should be involved in, besides just testing LLVM/Clang ``unofficially,'' inside Redmond labs.

                  Comment

                  Working...
                  X