$OpenBSD: patch-build_go,v 1.11 2020/01/03 17:57:35 edd Exp $
Index: build.go
--- build.go.orig
+++ build.go
@@ -202,6 +202,20 @@ var targets = map[string]target{
 			{src: "AUTHORS", dst: "deb/usr/share/doc/syncthing-relaypoolsrv/AUTHORS.txt", perm: 0644},
 		},
 	},
+	"stcli": {
+		name:        "stcli",
+		debname:     "stcli",
+		debdeps:     []string{"libc6"},
+		description: "Syncthing Commandline Interface",
+		buildPkgs:   []string{"github.com/syncthing/syncthing/cmd/stcli"},
+		binaryName:  "stcli", // .exe will be added automatically for Windows builds
+		archiveFiles: []archiveFile{
+			{src: "{{binary}}", dst: "{{binary}}", perm: 0755},
+		},
+		installationFiles: []archiveFile{
+			{src: "{{binary}}", dst: "deb/usr/bin/{{binary}}", perm: 0755},
+		},
+	},
 }
 
 // These are repos we need to clone to run "go generate"
@@ -466,7 +480,7 @@ func appendParameters(args []string, tags []string, pk
 
 	if !debugBinary {
 		// Regular binaries get version tagged and skip some debug symbols
-		args = append(args, "-ldflags", ldflags(path.Base(pkg)))
+		args = append(args, "-x", "-ldflags", ldflags(path.Base(pkg)))
 	} else {
 		// -gcflags to disable optimizations and inlining. Skip -ldflags
 		// because `Could not launch program: decoding dwarf section info at
