mirror of
https://github.com/go-delve/delve.git
synced 2025-10-30 02:07:58 +08:00
cmd: Support space separate flags for build-flags (#619)
Signed-off-by: Koichi Shiraishi <zchee.io@gmail.com>
This commit is contained in:
committed by
Derek Parker
parent
e4c7df1469
commit
2fad5abe74
@ -10,6 +10,7 @@ import (
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"strconv"
|
||||
"strings"
|
||||
"syscall"
|
||||
|
||||
"github.com/derekparker/delve/config"
|
||||
@ -446,7 +447,7 @@ func execute(attachPid int, processArgs []string, conf *config.Config, kind exec
|
||||
func gobuild(debugname, pkg string) error {
|
||||
args := []string{"-gcflags", "-N -l", "-o", debugname}
|
||||
if BuildFlags != "" {
|
||||
args = append(args, BuildFlags)
|
||||
args = append(args, strings.Fields(BuildFlags)...)
|
||||
}
|
||||
args = append(args, pkg)
|
||||
return gocommand("build", args...)
|
||||
@ -455,7 +456,7 @@ func gobuild(debugname, pkg string) error {
|
||||
func gotestbuild(pkg string) error {
|
||||
args := []string{"-gcflags", "-N -l", "-c", "-o", testdebugname}
|
||||
if BuildFlags != "" {
|
||||
args = append(args, BuildFlags)
|
||||
args = append(args, strings.Fields(BuildFlags)...)
|
||||
}
|
||||
args = append(args, pkg)
|
||||
return gocommand("test", args...)
|
||||
|
||||
Reference in New Issue
Block a user