aboutsummaryrefslogtreecommitdiff
path: root/build.go
diff options
context:
space:
mode:
authorSimon Frei <freisim93@gmail.com>2021-04-22 11:14:25 +0200
committerGitHub <noreply@github.com>2021-04-22 11:14:25 +0200
commit54e27f551d8dca1ecb3160c2b3a9441fff4c81f6 (patch)
treea9c1589421cf90c9320b7bea0e72075088a05dc2 /build.go
parent59bdcdabbaae2519955fb5514b1910e30446c99c (diff)
downloadsyncthing-54e27f551d8dca1ecb3160c2b3a9441fff4c81f6.tar.gz
syncthing-54e27f551d8dca1ecb3160c2b3a9441fff4c81f6.zip
cmd/syncthing: Add debug commands to cli (#7503)
Diffstat (limited to 'build.go')
-rw-r--r--build.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/build.go b/build.go
index 0a7f5b755..b35a81da3 100644
--- a/build.go
+++ b/build.go
@@ -472,7 +472,7 @@ func install(target target, tags []string) {
defer shouldCleanupSyso(sysoPath)
}
- args := []string{"install", "-v", "-trimpath"}
+ args := []string{"install", "-v"}
args = appendParameters(args, tags, target.buildPkgs...)
runPrint(goCmd, args...)
}
@@ -504,7 +504,7 @@ func build(target target, tags []string) {
defer shouldCleanupSyso(sysoPath)
}
- args := []string{"build", "-v", "-trimpath"}
+ args := []string{"build", "-v"}
args = appendParameters(args, tags, target.buildPkgs...)
runPrint(goCmd, args...)
}
@@ -538,13 +538,13 @@ func appendParameters(args []string, tags []string, pkgs ...string) []string {
if !debugBinary {
// Regular binaries get version tagged and skip some debug symbols
- args = append(args, "-ldflags", ldflags(tags))
+ args = append(args, "-trimpath", "-ldflags", ldflags(tags))
} else {
// -gcflags to disable optimizations and inlining. Skip -ldflags
// because `Could not launch program: decoding dwarf section info at
// offset 0x0: too short` on 'dlv exec ...' see
// https://github.com/go-delve/delve/issues/79
- args = append(args, "-gcflags", "-N -l")
+ args = append(args, "-gcflags", "all=-N -l")
}
return append(args, pkgs...)