make : use -lfto=auto to avoid warnings and maintain perf

This commit is contained in:
Georgi Gerganov 2023-10-30 16:00:53 +02:00
parent 57c4296cf0
commit bc28aaa8c2
No known key found for this signature in database
GPG Key ID: 449E073F9DC10735

View File

@ -120,11 +120,11 @@ MK_CXXFLAGS = -std=c++11 -fPIC
# -Ofast tends to produce faster code, but may not be available for some compilers.
ifdef LLAMA_FAST
MK_CFLAGS += -Ofast -flto
MK_CFLAGS += -Ofast -flto=auto
MK_HOST_CXXFLAGS += -Ofast
MK_CUDA_CXXFLAGS += -O3
else
MK_CFLAGS += -O3 -flto
MK_CFLAGS += -O3 -flto=auto
MK_CXXFLAGS += -O3
endif