aboutsummaryrefslogtreecommitdiff
path: root/0001-chore-add-debug-symbols-and-memory-leak-detection.patch
diff options
context:
space:
mode:
Diffstat (limited to '0001-chore-add-debug-symbols-and-memory-leak-detection.patch')
-rw-r--r--0001-chore-add-debug-symbols-and-memory-leak-detection.patch29
1 files changed, 29 insertions, 0 deletions
diff --git a/0001-chore-add-debug-symbols-and-memory-leak-detection.patch b/0001-chore-add-debug-symbols-and-memory-leak-detection.patch
new file mode 100644
index 0000000..787e29a
--- /dev/null
+++ b/0001-chore-add-debug-symbols-and-memory-leak-detection.patch
@@ -0,0 +1,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
+