Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: An LLVM/Clang Server Proposed

  1. #1
    Join Date
    Jan 2007
    Posts
    14,592

    Default 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...

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

  2. #2
    Join Date
    Oct 2009
    Posts
    2,085

    Default

    I don't get it... isn't clang just a compiler?
    What's wrong with just calling it as needed?

  3. #3
    Join Date
    Jul 2007
    Posts
    403

    Default

    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.

  4. #4
    Join Date
    Jul 2010
    Posts
    482

    Default

    Quote 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?

  5. #5
    Join Date
    Oct 2008
    Posts
    3,092

    Default

    Quote 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.

  6. #6
    Join Date
    Jun 2010
    Location
    ฿ 16LDJ6Hrd1oN3nCoFL7BypHSEYL84ca1JR
    Posts
    1,044

    Default

    Quote 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.
    http://cx4a.org/software/gccsense/

  7. #7
    Join Date
    Sep 2008
    Posts
    121

    Default

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

  8. #8
    Join Date
    Jul 2010
    Posts
    482

    Default

    Quote 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?

  9. #9
    Join Date
    Oct 2007
    Location
    OH, USA
    Posts
    33

    Default 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.

  10. #10
    Join Date
    Jul 2009
    Posts
    49

    Default

    Quote 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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •