Files
sing-box-extended-mirror/cmd/internal/build_shared/flags.go
T

16 lines
360 B
Go
Raw Normal View History

2026-07-13 11:23:59 +08:00
package build_shared
import "strings"
func LinkerFlags(version string, debug bool) string {
flags := []string{
"-X github.com/sagernet/sing-box/constant.Version=" + version,
2026-08-29 14:54:08 +08:00
"-X runtime.godebugDefault=multipathtcp=0,tlssha1=1",
2026-07-13 11:23:59 +08:00
"-checklinkname=0",
}
if !debug {
flags = append(flags, "-s", "-w", "-buildid=")
}
return strings.Join(flags, " ")
}