Announcement

Collapse
No announcement yet.

An LLVM/Clang Server Proposed

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

  • An LLVM/Clang Server Proposed

    Phoronix: An LLVM/Clang Server Proposed

    Proposed earlier this week within the Clang compiler camp for LLVM was a Clang-based server architecture for a persistent Clang server...

    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 don't get it... isn't clang just a compiler?
    What's wrong with just calling it as needed?

    Comment


    • #3
      The idea behind this is to support continuous incremental compilation, similar to Microsoft Intellisense, to give the programmer feedback for auto-completion (including fully-resolved types and class hierarchies, and the like) and to spot syntax errors in real-time. This will also speed debug compile and testing cycles, because most of the work will already be done and cached.

      Another potential use is for static analysis on blocks of code being worked on, to spot potential problems or oversights as the code is being written.

      I would also be interested in a scheme that allowed this to be used to create a build cluster, by splitting up and farming out work over a network interface to clangd.

      Comment


      • #4
        Originally posted by droidhacker View Post
        I don't get it... isn't clang just a compiler?
        What's wrong with just calling it as needed?
        Clang is based on libclang. Libclang is a library to process source code. It gives you source parsing, indexing, cross-referencing, declaration/definition lookup, refactoring, syntax highlighting, code completion. All the things to make you life easier. Now some dudes would like to have as a server.

        I am wondering why the gcc crowd never thought of this. What is better to assist you in coding than a compiler?

        Comment


        • #5
          Originally posted by log0 View Post
          Clang is based on libclang. Libclang is a library to process source code. It gives you source parsing, indexing, cross-referencing, declaration/definition lookup, refactoring, syntax highlighting, code completion. All the things to make you life easier. Now some dudes would like to have as a server.

          I am wondering why the gcc crowd never thought of this. What is better to assist you in coding than a compiler?
          I doubt they've never thought of it, since Intellisense and related IDE technologies are pretty old news. But GCC likely isn't easily able to split out the code to do this from the rest of the compiler like clang can, since it wasn't designed that way from the start and the codebase is so messy. I know KDevelop created their own parser rather than trying to re-use GCCs, most likely because it was going to be a lot easier to build it from scratch.

          Comment


          • #6
            Originally posted by log0 View Post
            I am wondering why the gcc crowd never thought of this. What is better to assist you in coding than a compiler?
            GCC-sense has been around for some time but it's much more of a hack as with llvm/clang I heard.

            Comment


            • #7
              I wonder how this would fit with build systems, i.e. configuration, build flags and such.

              Comment


              • #8
                Originally posted by ChrisXY View Post
                GCC-sense has been around for some time but it's much more of a hack as with llvm/clang I heard.
                http://cx4a.org/software/gccsense/
                Thanks ChrisXY. So it is a hacked gcc 4.4? to provide the interfaces for libclang type features. Wondering why it has not been integrated into gcc trunk. Too hacky?

                Comment


                • #9
                  an even better proposal, here is an idea

                  OK, Clang has better debugging and yadda yadda yadda... LLVM is the best thing since sliced bread, I get it.. I really get it.

                  so here is my proposal,

                  Have code compiled be at least as optimized as GNU GCC. Once you did that everyone would have EVERY compelling reason to use only Clang.
                  Match, or preferably exceed, GCC on every freekin` benchmark. You would think with the big Apple pockets, this would have already been the situation.

                  Comment


                  • #10
                    Originally posted by techzilla View Post
                    OK, Clang has better debugging and yadda yadda yadda... LLVM is the best thing since sliced bread, I get it.. I really get it.

                    so here is my proposal,

                    Have code compiled be at least as optimized as GNU GCC. Once you did that everyone would have EVERY compelling reason to use only Clang.
                    Match, or preferably exceed, GCC on every freekin` benchmark. You would think with the big Apple pockets, this would have already been the situation.
                    Just use clang while developing and compile the final executable with GCC, you get the best of both worlds.
                    clangs error messages are just so much better that I always use it.

                    Comment

                    Working...
                    X