]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
make: fix debug options not being applied to NVCC (#7714)
authorJohannes Gäßler <redacted>
Mon, 3 Jun 2024 14:28:58 +0000 (16:28 +0200)
committerGitHub <redacted>
Mon, 3 Jun 2024 14:28:58 +0000 (16:28 +0200)
Makefile

index c643fe0cc10bf0ba166601f022b5b84937b7a6fb..dca2aafd709e007177e27e728983802cd690140b 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -135,12 +135,16 @@ MK_NVCCFLAGS = -std=c++11
 ifdef LLAMA_FAST
 MK_CFLAGS     += -Ofast
 HOST_CXXFLAGS += -Ofast
+ifndef LLAMA_DEBUG
 MK_NVCCFLAGS  += -O3
+endif # LLAMA_DEBUG
 else
 MK_CFLAGS     += -O3
 MK_CXXFLAGS   += -O3
+ifndef LLAMA_DEBUG
 MK_NVCCFLAGS  += -O3
-endif
+endif # LLAMA_DEBUG
+endif # LLAMA_FAST
 
 ifndef LLAMA_NO_CCACHE
 CCACHE := $(shell which ccache)
@@ -201,9 +205,10 @@ ifdef LLAMA_SCHED_MAX_COPIES
 endif
 
 ifdef LLAMA_DEBUG
-       MK_CFLAGS   += -O0 -g
-       MK_CXXFLAGS += -O0 -g
-       MK_LDFLAGS  += -g
+       MK_CFLAGS    += -O0 -g
+       MK_CXXFLAGS  += -O0 -g
+       MK_LDFLAGS   += -g
+       MK_NVCCFLAGS += -O0 -g
 
        ifeq ($(UNAME_S),Linux)
                MK_CPPFLAGS += -D_GLIBCXX_ASSERTIONS