summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authormrfoxygmfr <mrfoxygmfr@sch9.ru>2025-05-22 19:48:43 +0300
committermrfoxygmfr <mrfoxygmfr@sch9.ru>2025-05-22 19:48:43 +0300
commitac6f8f6de98ab5fe672a47a37441b729150fe629 (patch)
tree831310d1d5f24783832e9cd753eac8b138624439 /Makefile
parent1592c5335a3aa157772715a7127cfcb115b5d860 (diff)
fix(build): now builds with clang
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile5
1 files changed, 3 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index e2ef40e..26c8a00 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,9 @@
ifeq ($(LLVM),1)
CC = clang
+ LD = ld.lld
else
CC = gcc
+ LD = ld
endif
CFLAGS = \
@@ -15,7 +17,6 @@ LDFLAGS = -pthread -lrt
ifeq ($(DEBUG),1)
CFLAGS += -g -fsanitize=address,leak,undefined
- #,memory
else
CFLAGS += -flto
LDFLAGS += -flto
@@ -68,5 +69,5 @@ build/%: %.c build/lib.o
build/lib.o: $(patsubst %.c,build/%.o,$(shell find lib -type f -name '*.c' -print))
@mkdir -p $(@D)
- @ld -r $^ -o $@
+ @$(LD) -r $^ -o $@