Skip to content

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

Description

@jiebanghan

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 .

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions