Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to add the debug flag -gcflags=all='-N -l' in Makefile or other files? #12

Open
jiebanghan opened this issue Nov 29, 2019 · 0 comments

Comments

@jiebanghan
Copy link

hi ,my aim is to debug the program ,so I must add the debug flag -gcflags=all='-N -l' in Makefile or other files, and I added it as below, but it does not works

func buildFlags(env build.Environment) (flags []string) {
	var ld []string
	//flags = append(flags, " -gcflags=all='-N -l' ")//new add
	if env.Commit != "" {
		ld = append(ld, "-X", "main.gitCommit="+env.Commit)
	}

how to add the debug flag -gcflags=all='-N -l' in Makefile or other files?thanks .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant