parent
3f9875e272
commit
471bb32ad1
@ -5,6 +5,7 @@ import (
|
||||
|
||||
"github.com/derekparker/delve/cmd/dlv/cmds"
|
||||
"github.com/derekparker/delve/pkg/version"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
// Build is the git sha of this binaries build.
|
||||
@ -14,6 +15,11 @@ func main() {
|
||||
if Build != "" {
|
||||
version.DelveVersion.Build = Build
|
||||
}
|
||||
os.Setenv("CGO_CFLAGS", "-O -g")
|
||||
const cgoCflagsEnv = "CGO_CFLAGS"
|
||||
if os.Getenv(cgoCflagsEnv) == "" {
|
||||
os.Setenv(cgoCflagsEnv, "-O -g")
|
||||
} else {
|
||||
logrus.WithFields(logrus.Fields{"layer": "dlv"}).Warnln("CGO_CFLAGS already set, Cgo code could be optimized.")
|
||||
}
|
||||
cmds.New(false).Execute()
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user