]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
make : fix missing -O3 (#8143)
authorslaren <redacted>
Wed, 26 Jun 2024 18:20:22 +0000 (20:20 +0200)
committerGitHub <redacted>
Wed, 26 Jun 2024 18:20:22 +0000 (21:20 +0300)
Makefile

index 64a6e6ff00e5ae7124032c6175525f2609626070..bbfe0f12b228f300f2f8895115708d091dc45d73 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -148,12 +148,6 @@ ifndef UNAME_M
 UNAME_M := $(shell uname -m)
 endif
 
-MK_CFLAGS     += -O3
-MK_CXXFLAGS   += -O3
-ifndef LLAMA_DEBUG
-MK_NVCCFLAGS  += -O3
-endif # LLAMA_DEBUG
-
 # In GNU make default CXX is g++ instead of c++.  Let's fix that so that users
 # of non-gcc compilers don't have to provide g++ alias or wrapper.
 DEFCC  := cc
@@ -312,7 +306,10 @@ ifdef LLAMA_DEBUG
                MK_CPPFLAGS += -D_GLIBCXX_ASSERTIONS
        endif
 else
-       MK_CPPFLAGS += -DNDEBUG
+       MK_CPPFLAGS   += -DNDEBUG
+       MK_CFLAGS     += -O3
+       MK_CXXFLAGS   += -O3
+       MK_NVCCFLAGS  += -O3
 endif
 
 ifdef LLAMA_SANITIZE_THREAD