From 58bb7d563149448c70c9cb8e4a7801660675f602 Mon Sep 17 00:00:00 2001 From: ochafik Date: Thu, 21 Sep 2023 00:52:24 +0100 Subject: [PATCH] Makefile: move unused logits flags where they don't interfere w/ targets (and also fix bad merge) --- Makefile | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index b7acf8f83..32c319bad 100644 --- a/Makefile +++ b/Makefile @@ -172,6 +172,10 @@ ifdef LLAMA_DISABLE_LOGS MK_CPPFLAGS += -DLOG_DISABLE_LOGS endif # LLAMA_DISABLE_LOGS +ifndef LLAMA_NO_SKIP_UNUSED_LOGITS + MK_CPPFLAGS += -DLLAMA_SKIP_UNUSED_LOGITS +endif # LLAMA_NO_SKIP_UNUSED_LOGITS + # warnings MK_CFLAGS += -Wall -Wextra -Wpedantic -Wcast-qual -Wdouble-promotion -Wshadow -Wstrict-prototypes -Wpointer-arith \ -Wmissing-prototypes -Werror=implicit-int -Wno-unused-function @@ -447,15 +451,6 @@ k_quants.o: k_quants.c k_quants.h $(CC) $(CFLAGS) -c $< -o $@ endif # LLAMA_NO_K_QUANTS -ifndef LLAMA_NO_SKIP_UNUSED_LOGITS - CFLAGS += -DLLAMA_SKIP_UNUSED_LOGITS - CXXFLAGS += -DLLAMA_SKIP_UNUSED_LOGITS -endif # LLAMA_NO_SKIP_UNUSED_LOGITS - -ifdef LLAMA_DISABLE_LOGS - CFLAGS += -DLOG_DISABLE_LOGS - CXXFLAGS += -DLOG_DISABLE_LOGS -endif # LLAMA_DISABLE_LOGS # combine build flags with cmdline overrides override CFLAGS := $(MK_CPPFLAGS) $(CPPFLAGS) $(MK_CFLAGS) $(CFLAGS) override CXXFLAGS := $(MK_CPPFLAGS) $(CPPFLAGS) $(MK_CXXFLAGS) $(CXXFLAGS)