Files
sing-box-extended-mirror/cmd/internal/build_shared/flags.go
T
2026-08-30 17:41:42 +08:00

16 lines
359 B
Go

package build_shared
import "strings"
func LinkerFlags(version string, debug bool) string {
flags := []string{
"-X github.com/sagernet/sing-box/constant.Version=" + version,
"-X internal/godebug.defaultGODEBUG=multipathtcp=0",
"-checklinkname=0",
}
if !debug {
flags = append(flags, "-s", "-w", "-buildid=")
}
return strings.Join(flags, " ")
}