summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMoritz Poldrack <git@moritz.sh>2022-06-22 12:12:00 +0200
committerRobin Jarry <robin@jarry.cc>2022-06-24 21:08:21 +0200
commitd5e278e5ffa772238728e4c874bf9568bb0d18e1 (patch)
treea0e7f1ad5fcd1d6d2a86ca111b206e869eb90d4d
parentd889981088672a7dbe56985382e4bed8516b0c72 (diff)
downloadaerc-d5e278e5ffa772238728e4c874bf9568bb0d18e1.zip
mk: add dev target with go race detector enabled
Add a dev target which enables Go's race detector. This requires CGo to be enabled and reduces performance significantly, but helps in finding data races which can lead to hard to diagnose bugs. Signed-off-by: Moritz Poldrack <git@moritz.sh> Acked-by: Robin Jarry <robin@jarry.cc>
-rw-r--r--Makefile5
1 files changed, 5 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 503d840..1b32a6b 100644
--- a/Makefile
+++ b/Makefile
@@ -47,6 +47,11 @@ _!=grep -sqFx '$(build_cmd)' .aerc.d || rm -f .aerc.d
aerc: $(GOSRC) .aerc.d
$(build_cmd)
+.PHONY: dev
+dev:
+ $(MAKE) aerc BUILD_OPTS="-trimpath -race"
+ GORACE="log_path=race.log strip_path_prefix=git.sr.ht/~rjarry/aerc/" ./aerc
+
.PHONY: fmt
fmt:
gofmt -w .