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
|
||||
CFLAGS = -Wall -Wextra -O2 -std=c11 -D_XOPEN_SOURCE=700
|
||||
LDFLAGS = -pthread -lssh
|
||||
CTL_LDFLAGS =
|
||||
INCLUDES = -Iinclude
|
||||
DEPFLAGS = -MMD -MP
|
||||
|
||||
|
|
@ -43,7 +44,7 @@ $(TARGET): $(OBJECTS)
|
|||
@echo "Build complete: $(TARGET)"
|
||||
|
||||
$(CTL_TARGET): $(CTL_OBJECTS)
|
||||
$(CC) $(CTL_OBJECTS) -o $@
|
||||
$(CC) $(CTL_OBJECTS) -o $@ $(CTL_LDFLAGS)
|
||||
@echo "Build complete: $(CTL_TARGET)"
|
||||
|
||||
$(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: LDFLAGS += -fsanitize=address
|
||||
asan: CTL_LDFLAGS += -fsanitize=address
|
||||
asan: clean $(TARGETS)
|
||||
@echo "AddressSanitizer build complete. Run with: ASAN_OPTIONS=detect_leaks=1 ./tnt"
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue