mirror of
https://github.com/SagerNet/sing-box.git
synced 2026-07-19 21:08:40 +08:00
16 lines
359 B
Go
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, " ")
|
|
}
|