Skip to content

Commit

Permalink
llgo/utils_test.go: don't invoke clang with -g on Darwin.
Browse files Browse the repository at this point in the history
Don't know if this is darwin specific or just specific to my system,
but the change is harmless enough to make in by default and revisited
at a later date.
  • Loading branch information
quarnster committed Sep 16, 2013
1 parent 825f9b0 commit c9450a8
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion llgo/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
"path"
"path/filepath"
"reflect"
"runtime"
"sort"
"strings"
"testing"
Expand Down Expand Up @@ -120,7 +121,12 @@ func getRuntimeModuleFile() (string, error) {

for i, cfile := range cfiles {
bcfile := filepath.Join(tempdir, fmt.Sprintf("%d.bc", i))
cmd := exec.Command("clang", "-g", "-c", "-emit-llvm", "-o", bcfile, cfile)
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:]
}
cmd := exec.Command("clang", args...)
cmd.Stderr = os.Stderr
if err := cmd.Run(); err != nil {
return "", fmt.Errorf("clang failed: %s", err)
Expand Down

0 comments on commit c9450a8

Please sign in to comment.