Announcement

Collapse
No announcement yet.

Why Sony Is Using LLVM/Clang On The PlayStation 4

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

  • Why Sony Is Using LLVM/Clang On The PlayStation 4

    Phoronix: Why Sony Is Using LLVM/Clang On The PlayStation 4

    Sony is using LLVM/Clang as its CPU compiler as part of the development kit for targeting the PlayStation 4. Here's some more information on their reasoning for doing so and other details...

    http://www.phoronix.com/vr.php?view=MTU1MTY

  • #2
    I have a maybe stupid question. How is the ABI compatibility guaranteed when using LLVM on a system that is 99% built with another compiler like GCC? I mean library linking, calling conventions, symbol name mangling and all that kind of stuff.

    Comment


    • #3
      Originally posted by zoomblab View Post
      I have a maybe stupid question. How is the ABI compatibility guaranteed when using LLVM on a system that is 99% built with another compiler like GCC? I mean library linking, calling conventions, symbol name mangling and all that kind of stuff.
      AFAIK, clang uses the same conventions GCC uses.

      Comment


      • #4
        Originally posted by zoomblab View Post
        I have a maybe stupid question. How is the ABI compatibility guaranteed when using LLVM on a system that is 99% built with another compiler like GCC? I mean library linking, calling conventions, symbol name mangling and all that kind of stuff.
        Quite interesting read on this subject : https://blog.qt.digia.com/blog/2009/...compatibility/

        Comment


        • #5
          After reading what happened to the developers of Game Dev Tycoon I think it’s a good choice to avoid using GCC in proprietary software development. They aren’t even shipping glibc with the game (and I can’t be bothered to re-read the complete GPL and LGPL licences to understand what part of it they failed to comply with). It seems it wasn’t a lot of work to comply, but using clang keeps the devs and publishers away from troubles like this.

          Comment


          • #6
            I my opinion critical parts like a compiler and libc(++) should be free with copyleft but compatible with proprietary application.

            Comment


            • #7
              Originally posted by Thaodan View Post
              I my opinion critical parts like a compiler and libc(++) should be free with copyleft but compatible with proprietary application.
              That's kind of a contradiction in itself. Either it is copyleft or it is compatible with proprietary applications. Exception being if you mean "dinamically linkable" to proprietary applications, which LGPL and the current implementation of glibc are. But copyleft implies that if you actually touch the code (instead of calling the API), you have to release the code.

              Comment


              • #8
                Originally posted by mrugiero View Post
                That's kind of a contradiction in itself. Either it is copyleft or it is compatible with proprietary applications. Exception being if you mean "dinamically linkable" to proprietary applications, which LGPL and the current implementation of glibc are. But copyleft implies that if you actually touch the code (instead of calling the API), you have to release the code.
                I mean only the changes you have done to that what you have used. But anyway most time dynamic linking should be fine.

                Comment


                • #9
                  Originally posted by phoronix View Post
                  Phoronix: Why Sony Is Using LLVM/Clang On The PlayStation 4
                  llvm/clang is a fine choice for C++... the big question is why on earth would they stick with the atrocious Microsoft ecosystem C++ toolset?!?

                  - Many programmers really think that Visual Studio is the best, because they've never understood competing tool chains. When they try to use something else, it just seems like a broken version of Visual Studio to them.
                  - Microsoft Visual Studio requires Microsoft Windows. One major flaw of Windows is that the shell is terrible. You can install a port of bash, but it doesn't work as well as using a real *nix OS. *nix (including Mac OS) is much better for any command line centric development work.
                  - Try using an elegant command line build tool, like SBT (www.scala-sbt.org) or Gradle or Ruby Rake. Once you get proficient, you won't want to go back to using IDE-proprietary auto-generated build files like Visual Studio does.

                  And, honestly, use a nicer programming language like Haskell or Scala or Rust and you won't want to use C++.

                  Comment


                  • #10
                    Originally posted by DanLamb View Post
                    llvm/clang is a fine choice for C++... the big question is why on earth would they stick with the atrocious Microsoft ecosystem C++ toolset?!?

                    - Many programmers really think that Visual Studio is the best, because they've never understood competing tool chains. When they try to use something else, it just seems like a broken version of Visual Studio to them.
                    - Microsoft Visual Studio requires Microsoft Windows. One major flaw of Windows is that the shell is terrible. You can install a port of bash, but it doesn't work as well as using a real *nix OS. *nix (including Mac OS) is much better for any command line centric development work.
                    - Try using an elegant command line build tool, like SBT (www.scala-sbt.org) or Gradle or Ruby Rake. Once you get proficient, you won't want to go back to using IDE-proprietary auto-generated build files like Visual Studio does.

                    And, honestly, use a nicer programming language like Haskell or Scala or Rust and you won't want to use C++.
                    Clearly you are a high-dollar professional developer with decades of experience who provides knowledgeable, fact-based feedback based purely on experience and a deep understanding of the problems each tool solves and the problem they cause on large, shipping products. You should contact Sony's engineers and lay down your wisdom on them.

                    Comment

                    Working...
                    X