Skip to content

Commit

Permalink
Tweaks based on @axw's feedback.
Browse files Browse the repository at this point in the history
* Restored Copyright dates
* x -> printcommands
* enable -g if not darwin
* lock_unimplemented.go is indeed not originating from Go source code
  • Loading branch information
quarnster committed Sep 17, 2013
1 parent c9450a8 commit d07ab3e
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion cmd/llgo-dist/buildllgo.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2012-2013 The llgo Authors.
// Copyright 2012 The llgo Authors.
// Use of this source code is governed by an MIT-style
// license that can be found in the LICENSE file.

Expand Down
2 changes: 1 addition & 1 deletion cmd/llgo-dist/buildruntime.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2012-2013 The llgo Authors.
// Copyright 2012 The llgo Authors.
// Use of this source code is governed by an MIT-style
// license that can be found in the LICENSE file.

Expand Down
8 changes: 4 additions & 4 deletions cmd/llgo-dist/main.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2012-2013 The llgo Authors.
// Copyright 2012 The llgo Authors.
// Use of this source code is governed by an MIT-style
// license that can be found in the LICENSE file.

Expand Down Expand Up @@ -27,7 +27,7 @@ var (
llvmbindir string

verbose bool
x bool
printcommands bool
triple string
buildctx *build.Context
sharedllvm bool
Expand Down Expand Up @@ -55,7 +55,7 @@ func init() {
// we use install_name_tool to change it after linking instead.
flag.BoolVar(&install_name_tool, "install_name_tool", true, "Change path of dynamic libLLVM with install_name_tool (darwin only)")
}
flag.BoolVar(&x, "x", x, "Print commands as they are run")
flag.BoolVar(&printcommands, "x", printcommands, "Print commands as they are run")
flag.BoolVar(&verbose, "v", verbose, "Be verbose")
}

Expand All @@ -72,7 +72,7 @@ func (m mycommand) CombinedOutput() ([]byte, error) {
}

func command(name string, arg ...string) mycommand {
if x {
if printcommands {
if name == llgobuildbin {
arg = append([]string{"-x"}, arg...)
}
Expand Down
8 changes: 4 additions & 4 deletions llgo/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,10 @@ func getRuntimeModuleFile() (string, error) {

for i, cfile := range cfiles {
bcfile := filepath.Join(tempdir, fmt.Sprintf("%d.bc", i))
args := []string{"-g", "-c", "-emit-llvm", "-o", bcfile, cfile}
if runtime.GOOS == "darwin" {
// TODO(q): -g breaks badly on my system at the moment, so disabling for now
args = args[1:]
args := []string{"-c", "-emit-llvm", "-o", bcfile, cfile}
if runtime.GOOS != "darwin" {
// TODO(q): -g breaks badly on my system at the moment, so is not enabled on darwin for now
args = append([]string{"-g"}, args...)
}
cmd := exec.Command("clang", args...)
cmd.Stderr = os.Stderr
Expand Down
4 changes: 2 additions & 2 deletions pkg/runtime/lock_unimplemented.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// Copyright 2013 The llgo Authors.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.

// +build !freebsd,!linux,!pnacl
Expand Down

0 comments on commit d07ab3e

Please sign in to comment.