aboutsummaryrefslogtreecommitdiff
path: root/0001-chore-add-debug-symbols-and-memory-leak-detection.patch
blob: 787e29a4fa21135c60dc45d21af3e76a30a22db0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
From 7969c9218ccb947f564122582c5bbd65558c32c1 Mon Sep 17 00:00:00 2001
From: aintea <aintea@protonmail.com>
Date: Mon, 29 Jun 2026 01:16:05 +0300
Subject: [PATCH] chore: add debug symbols and memory leak detection

---
 Makefile | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 021491e..51f5ef0 100644
--- a/Makefile
+++ b/Makefile
@@ -27,7 +27,11 @@ CFLAGS  += $(shell pkg-config --cflags luajit) -I./include -Wno-format-truncatio
 default: pkgit
 
 pkgit: $(OBJS)
-	${CC} -o $@ $^ $(shell pkg-config --libs luajit)
+	${CC} -o $@ $^ $(shell pkg-config --libs luajit) $(LDFLAGS)
+
+debug: CFLAGS += -fsanitize=address -g3
+debug: LDFLAGS += -fsanitize=address
+debug: pkgit
 
 $(OBJDIR):
 	@mkdir -p $(OBJDIR)
-- 
2.54.0