Announcement

Collapse
No announcement yet.

A Go Front-End Could Soon Be Landing In LLVM

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

  • A Go Front-End Could Soon Be Landing In LLVM

    Phoronix: A Go Front-End Could Soon Be Landing In LLVM

    The "llgo" Go front-end to LLVM could soon be accepted as a new sub-project. This Go front-end is written in the Go language itself...

    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
    This is exciting! Is there any benchmarks comparing compile and running speed against `gc` and `gccgo`?

    Comment


    • #3
      How does one build it if it's written in go?

      Comment


      • #4
        Originally posted by curaga View Post
        How does one build it if it's written in go?
        I have the same question..

        Comment


        • #5
          Originally posted by curaga View Post
          How does one build it if it's written in go?
          llgo requires:

          Go 1.3 or later.
          It's the same as for a C compiler I suppose.

          Comment


          • #6
            It's called self-hosting.

            Comment


            • #7
              Originally posted by curaga View Post
              How does one build it if it's written in go?
              You build it with either (A) the official Go compiler or (B) with a previous build of llgo

              Rust is also self-hosting on top of LLVM, so think of this project as something similar on top of that setup.

              Comment


              • #8
                Originally posted by Skrapion View Post
                Nope, self-hosting has nothing to do with the chicken-egg problem. Being able to build itself is neat, but you need to get the first build up somehow.

                This then brings all the issues about trusting trust if you have to install a Go compiler from binaries somewhere.

                Comment


                • #9
                  Self-hosting is the term used to describe a compiler written in the same language it's compiling. The link I gave addresses the chicken and egg problem.

                  Comment


                  • #10
                    There's already a compiler for go. The new compiler just has been written in go and use the existing compiler to compile.

                    And also it's not really an egg-or-chicken kind of problem. When you're starting off a new language, a compiler must be written in some other language first. If you write the compiler in that language first, then it could not be compile as there is no mechanism to compile that code to something runnable on computer. Remember a compiler is also a computer program too. Even assembler has to be first written in machine language (and there's no translation/compilation of code written in machine language. It's already in the binary format so it does not need a compiler.). Once you have a compiler you can then create another compiler using the language the compiler aimed to compile.

                    Comment

                    Working...
                    X