Announcement

Collapse
No announcement yet.

Android NDK r16: Developers Should Start Using LLVM's libc++ With GCC On The Way Out

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

  • Android NDK r16: Developers Should Start Using LLVM's libc++ With GCC On The Way Out

    Phoronix: Android NDK r16: Developers Should Start Using LLVM's libc++ With GCC On The Way Out

    Google has announced the availability today of the Android Native Development Kit (NDK) Release 16. This release is worth mentioning in that Google is now encouraging developers to start using libc++ as their C++ standard library...

    http://www.phoronix.com/scan.php?pag...ndroid-NDK-r16

  • #2
    What's the problem with GCC that pushes so many people to clang LLVM??

    Comment


    • #3
      Kind of a dick move to change horses mid-race. And for no tangible benefit. GCC is still faster overall, and with much wider platform support. LLVM is a little faster to compile, but the difference is negligible. It am willing to bet it will save me less time on compilation than the time that will be wasted porting to a new compiler.

      Sure, LLVM is more modular and easier to maintain and introduce new features, but what do google care, it is not them who do that, as long as new platform is provided timely, which it is, there is nothing wrong with using GCC as a black box compiler.

      This would be problematic for people who rely on GCC language extensions or use the NDK indirectly, for example using Qt. The last NDK release that didn't have any problems with Qt on my target platforms is r10... Hopefully even if deprecated, it will remain supported for a decent period of time.
      Last edited by ddriver; 09-06-2017, 04:44 PM.

      Comment


      • #4
        Google is dick company.

        Comment


        • #5
          Originally posted by ddriver View Post
          Sure, LLVM is more modular and easier to maintain and introduce new features, but what do google care, it is not them who do that, as long as new platform is provided timely, which it is, there is nothing wrong with using GCC as a black box compiler.
          You do realize that Google is one of the primary developers of LLVM/Clang right? Right? They are very much invested and they have plenty of reason to care.

          Comment


          • #6
            Very good step. I switched in all my Android projects to clang + LLVM libc++ some time ago and it works much better. Overall LLVM libc++ is much better if you care about cross-platform support (you can rely on this stl implementation without problems on Android, Linux, Windows, iOS, macOS etc). gnustl is in really poor state eg. problems with locale or missing trivial C++11 features like 'std::to_string'. I also prefer clang++ than g++ and use this compiler in all my projects (only to compile stuff for Windows I still use MS compiler) since 2009. I also know a lot of c++ programmers whose prefer clang++ over g++ like me.

            Comment


            • #7
              Kinda old news, actually. Here's a summary of their rationale:

              https://github.com/android-ndk/ndk/i...ment-198067100

              Comment


              • #8
                Originally posted by trivialfis View Post
                What's the problem with GCC that pushes so many people to clang LLVM??
                There are a few, but I'm not sure if these are all real problems or only artificial ones.

                There is the complexity of gcc and the fact that it's written in C. Some dislike this and feel more at home with a leaner compiler and with more code in C++. Some associate "new" with "better" and "starting from scratch" as "good" or hate having to work with older generations of developers. Some also feel they're having no choice even when the one available is a long-standing open source compiler. I don't believe there are real technical problems behind it, but these are problems nevertheless.

                There is currently a trend to reinvent the entire tool chain and not just gcc. So does the GNU linker now get competition from gold and the llvm linker lld. People also dislike autoconf and make, but prefer tools such as cmake, meson, ninja, and others. Some use them in combination, others as a replacement, but there is a growing trend that tries to change the way we build C/C++ software on Linux.

                We will have to see what finds followers, what gets copied and what remains standing, and what gets abandoned. There are many opinions floating around, most of them seem to be personal preferences based on what people started out with.
                Last edited by sdack; 09-06-2017, 06:51 PM.

                Comment


                • #9
                  P.S. gotta love their release notes:
                  • libc++ is out of beta and is now the preferred STL in the NDK. Starting in r17, libc++ is the default STL for CMake and standalone toolchains. If you manually selected a different STL, we strongly encourage you to move to libc++. For more details, see this blog post. TODO: Create blog post.
                  Source: https://android.googlesource.com/pla...6/CHANGELOG.md
                  (emphasis added)

                  Comment


                  • #10
                    why all this hate to clang and llvm, they are a very good compiler and infrastructure

                    Comment

                    Working...
                    X