File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -676,6 +676,8 @@ add_library(ggml OBJECT
676
676
${GGML_SOURCES_EXTRA} ${GGML_HEADERS_EXTRA}
677
677
)
678
678
679
+ set_property (TARGET ggml PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE )
680
+
679
681
target_include_directories (ggml PUBLIC . ${LLAMA_EXTRA_INCLUDES} )
680
682
target_compile_features (ggml PUBLIC c_std_11 ) # don't bump
681
683
target_link_libraries (ggml PUBLIC Threads::Threads ${LLAMA_EXTRA_LIBS} )
Original file line number Diff line number Diff line change @@ -120,12 +120,12 @@ MK_CXXFLAGS = -std=c++11 -fPIC
120
120
121
121
# -Ofast tends to produce faster code, but may not be available for some compilers.
122
122
ifdef LLAMA_FAST
123
- MK_CFLAGS += -Ofast
124
- MK_HOST_CXXFLAGS += -Ofast
125
- MK_CUDA_CXXFLAGS += -O3
123
+ MK_CFLAGS += -flto - Ofast
124
+ MK_HOST_CXXFLAGS += -flto - Ofast
125
+ MK_CUDA_CXXFLAGS += -flto - O3
126
126
else
127
- MK_CFLAGS += -O3
128
- MK_CXXFLAGS += -O3
127
+ MK_CFLAGS += -flto - O3
128
+ MK_CXXFLAGS += -flto - O3
129
129
endif
130
130
131
131
# clock_gettime came in POSIX.1b (1993)
You can’t perform that action at this time.
0 commit comments