Skip to content

Commit

Permalink
Experimental fix for CGO_CFLAGS
Browse files Browse the repository at this point in the history
  • Loading branch information
justinsb committed Jun 29, 2018
1 parent 257d889 commit 96be613
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions go/tools/builders/stdlib.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,15 @@ func run(args []string) error {
return fmt.Errorf("error modifying cgo environment to absolute path: %v", err)
}

{
cgoFlags := os.Getenv("CGO_CFLAGS")
cgoFlags += " -g -O2"
cgoFlags += " -fdebug-prefix-map=" + abs(".") + "=."
if err := os.Setenv("CGO_CFLAGS", cgoFlags); err != nil {
return err
}
}

for _, target := range []string{"std", "runtime/cgo"} {
if err := goenv.runCommand(append(installArgs, target)); err != nil {
return err
Expand Down

0 comments on commit 96be613

Please sign in to comment.