Skip to content

Commit c7ab7b6

Browse files
authored
make : fix missing -O3 (#8143)
1 parent f2d48ff commit c7ab7b6

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

Makefile

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -148,12 +148,6 @@ ifndef UNAME_M
148148
UNAME_M := $(shell uname -m)
149149
endif
150150

151-
MK_CFLAGS += -O3
152-
MK_CXXFLAGS += -O3
153-
ifndef LLAMA_DEBUG
154-
MK_NVCCFLAGS += -O3
155-
endif # LLAMA_DEBUG
156-
157151
# In GNU make default CXX is g++ instead of c++. Let's fix that so that users
158152
# of non-gcc compilers don't have to provide g++ alias or wrapper.
159153
DEFCC := cc
@@ -312,7 +306,10 @@ ifdef LLAMA_DEBUG
312306
MK_CPPFLAGS += -D_GLIBCXX_ASSERTIONS
313307
endif
314308
else
315-
MK_CPPFLAGS += -DNDEBUG
309+
MK_CPPFLAGS += -DNDEBUG
310+
MK_CFLAGS += -O3
311+
MK_CXXFLAGS += -O3
312+
MK_NVCCFLAGS += -O3
316313
endif
317314

318315
ifdef LLAMA_SANITIZE_THREAD

0 commit comments

Comments
 (0)