mirror of
https://oauth2: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@github.com/m1ngsama/TNT.git
synced 2026-06-26 05:44:38 +08:00
Fix tntctl ASAN link flags
This commit is contained in:
parent
f6d5765d81
commit
a800b026b3
1 changed files with 3 additions and 1 deletions
4
Makefile
4
Makefile
|
|
@ -4,6 +4,7 @@
|
||||||
CC = gcc
|
CC = gcc
|
||||||
CFLAGS = -Wall -Wextra -O2 -std=c11 -D_XOPEN_SOURCE=700
|
CFLAGS = -Wall -Wextra -O2 -std=c11 -D_XOPEN_SOURCE=700
|
||||||
LDFLAGS = -pthread -lssh
|
LDFLAGS = -pthread -lssh
|
||||||
|
CTL_LDFLAGS =
|
||||||
INCLUDES = -Iinclude
|
INCLUDES = -Iinclude
|
||||||
DEPFLAGS = -MMD -MP
|
DEPFLAGS = -MMD -MP
|
||||||
|
|
||||||
|
|
@ -43,7 +44,7 @@ $(TARGET): $(OBJECTS)
|
||||||
@echo "Build complete: $(TARGET)"
|
@echo "Build complete: $(TARGET)"
|
||||||
|
|
||||||
$(CTL_TARGET): $(CTL_OBJECTS)
|
$(CTL_TARGET): $(CTL_OBJECTS)
|
||||||
$(CC) $(CTL_OBJECTS) -o $@
|
$(CC) $(CTL_OBJECTS) -o $@ $(CTL_LDFLAGS)
|
||||||
@echo "Build complete: $(CTL_TARGET)"
|
@echo "Build complete: $(CTL_TARGET)"
|
||||||
|
|
||||||
$(OBJ_DIR)/%.o: $(SRC_DIR)/%.c | $(OBJ_DIR)
|
$(OBJ_DIR)/%.o: $(SRC_DIR)/%.c | $(OBJ_DIR)
|
||||||
|
|
@ -99,6 +100,7 @@ debian-source-package:
|
||||||
|
|
||||||
asan: CFLAGS += -g -fsanitize=address -fno-omit-frame-pointer
|
asan: CFLAGS += -g -fsanitize=address -fno-omit-frame-pointer
|
||||||
asan: LDFLAGS += -fsanitize=address
|
asan: LDFLAGS += -fsanitize=address
|
||||||
|
asan: CTL_LDFLAGS += -fsanitize=address
|
||||||
asan: clean $(TARGETS)
|
asan: clean $(TARGETS)
|
||||||
@echo "AddressSanitizer build complete. Run with: ASAN_OPTIONS=detect_leaks=1 ./tnt"
|
@echo "AddressSanitizer build complete. Run with: ASAN_OPTIONS=detect_leaks=1 ./tnt"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue