Files
nixpkgs/pkgs/by-name/de/delve/disable-fortify.diff
Sandro Jäckel 693449ae42 delve: unbreak go version -m dlv
This is used by vscode to determine the go version the tool was compiled with.
2025-02-18 13:55:56 +01:00

14 lines
385 B
Diff

diff --git a/cmd/dlv/main.go b/cmd/dlv/main.go
index 2207708e..a7e8a3c2 100644
--- a/cmd/dlv/main.go
+++ b/cmd/dlv/main.go
@@ -21,6 +21,8 @@ func main() {
version.DelveVersion.Build = Build
}
+ os.Setenv("disableHardening", "fortify "+os.Getenv("disableHardening"))
+
const cgoCflagsEnv = "CGO_CFLAGS"
if os.Getenv(cgoCflagsEnv) == "" {
os.Setenv(cgoCflagsEnv, "-O0 -g")