Skip to content
This repository has been archived by the owner on Dec 14, 2023. It is now read-only.

Commit

Permalink
Merge pull request #203 from pcc/libgo-cleanup
Browse files Browse the repository at this point in the history
Clean up libgo branch in preparation for merge into master
  • Loading branch information
pcc committed Jul 22, 2014
2 parents 5f5c7af + 11155d3 commit c877d30
Show file tree
Hide file tree
Showing 379 changed files with 858 additions and 13,240 deletions.
5 changes: 0 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,4 @@
_obj
bin
cmd/gllgo/gllgo
cmd/llgo/llgo
cmd/llgo-dist/llgo-dist
cmd/llgo-build/llgo-build
llgo/llgo
llgo/gotest.out*
workdir
9 changes: 8 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
j = 1
prefix = /usr/local
bootstrap = quick
llvmdir = $(shell go list -f '{{.Dir}}' github.com/go-llvm/llvm)/workdir/llvm_build

bootstrap: workdir/.bootstrap-stamp

install: bootstrap
./install.sh $(prefix)

workdir/.bootstrap-stamp: workdir/.update-libgo-stamp workdir/.update-clang-stamp bootstrap.sh *.go build/*.go cmd/gllgo/*.go cmd/cc-wrapper/*.go debug/*.go ssaopt/*.go
check-libgo: bootstrap
$(MAKE) -C workdir/gofrontend_build/libgo-stage1 check

check-llgo: bootstrap
$(llvmdir)/bin/llvm-lit -s test

workdir/.bootstrap-stamp: workdir/.update-libgo-stamp workdir/.update-clang-stamp bootstrap.sh build/*.go cmd/gllgo/*.go cmd/cc-wrapper/*.go debug/*.go irgen/*.go ssaopt/*.go
./bootstrap.sh $(bootstrap) -j$(j)

workdir/.update-clang-stamp: update_clang.sh
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@

llgo is a [Go](http://golang.org) frontend for [LLVM](http://llvm.org), written in Go.

llgo is under active development, but is still considered experimental. It is not presently useful for real work. Progress will be reported at [http://blog.awilkins.id.au](http://blog.awilkins.id.au).
llgo is under active development. It compiles and passes most of the standard library test suite and a substantial portion of the gc test suite, but there are some corner cases that are known not to be handled correctly yet. Nevertheless it can compile modestly substantial programs (including itself; it is self hosting on x86-64 Linux).

Progress will be reported on the [mailing list](https://groups.google.com/d/forum/llgo-dev).

# Installation

Expand All @@ -15,7 +17,7 @@ To install llgo, use make:

You may need to build LLVM. See GoLLVM's README.md for more information.

llgo requires Go 1.3, or Go 1.2 with a [bug fix](https://codereview.appspot.com/96790047/) applied. See also README.patches for a list of additional patches to apply.
llgo requires Go 1.3 or later.

# Running

Expand Down
4 changes: 0 additions & 4 deletions README.patches

This file was deleted.

10 changes: 5 additions & 5 deletions cmd/gllgo/gllgo.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ import (
"path/filepath"
"strings"

"github.com/go-llvm/llgo"
"github.com/go-llvm/llgo/debug"
"github.com/go-llvm/llgo/irgen"
"github.com/go-llvm/llvm"
)

Expand All @@ -35,27 +35,27 @@ func report(err error) {
}

func displayVersion() {
fmt.Printf("llgo version %s (%s)\n", llgo.Version(), llgo.GoVersion())
fmt.Printf("llgo version %s (%s)\n", irgen.Version(), irgen.GoVersion())
fmt.Println()
os.Exit(0)
}

func initCompiler(opts *driverOptions) (*llgo.Compiler, error) {
func initCompiler(opts *driverOptions) (*irgen.Compiler, error) {
importPaths := make([]string, len(opts.importPaths)+len(opts.libPaths))
copy(importPaths, opts.importPaths)
copy(importPaths[len(opts.importPaths):], opts.libPaths)
if opts.prefix != "" {
importPaths = append(importPaths, filepath.Join(opts.prefix, "lib", "go"))
}
copts := llgo.CompilerOptions{
copts := irgen.CompilerOptions{
TargetTriple: opts.triple,
GenerateDebug: opts.generateDebug,
DebugPrefixMaps: opts.debugPrefixMaps,
DumpSSA: opts.dumpSSA,
GccgoPath: opts.gccgoPath,
ImportPaths: importPaths,
}
return llgo.NewCompiler(copts)
return irgen.NewCompiler(copts)
}

type actionKind int
Expand Down
Loading

0 comments on commit c877d30

Please sign in to comment.