build: add CONFIG_OPTIMIZE to turn on all useful compiler optimizations
LTO, fastmath, and native
@@ -9,7 +9,7 @@ CONFIG_MLX5=n
CONFIG_MLX4=n
CONFIG_SPDK=n
CONFIG_DEBUG=n
-CONFIG_NATIVE=n
+CONFIG_OPTIMIZE=y
CONFIG_DIRECTPATH=n
# shared toolchain definitions
@@ -35,8 +35,8 @@ FLAGS += -DDEBUG -DCCAN_LIST_DEBUG -rdynamic -O0 -ggdb -mssse3
LDFLAGS += -rdynamic
else
FLAGS += -DNDEBUG -O3
-ifeq ($(CONFIG_NATIVE),y)
-FLAGS += -march=native
+ifeq ($(CONFIG_OPTIMIZE),y)
+FLAGS += -march=native -flto -ffast-math
else
FLAGS += -mssse3
endif
