Linux: Remove unused code from final binary

Signed-off-by: Simon Rozman <simon@rozman.si>
This commit is contained in:
Simon Rozman 2022-09-16 13:03:34 +02:00
parent ff509ed6b5
commit 839c6fc1e6

View File

@ -8,8 +8,9 @@ CFLAGS := $(CFLAGS) -Og -g
CXXFLAGS := $(CXXFLAGS) -Og -g
else
CPPFLAGS := $(CPPFLAGS) -DNDEBUG
CFLAGS := $(CFLAGS) -O3
CXXFLAGS := $(CXXFLAGS) -O3
CFLAGS := $(CFLAGS) -O3 -fdata-sections -ffunction-sections
CXXFLAGS := $(CXXFLAGS) -O3 -fdata-sections -ffunction-sections
LDFLAGS := $(LDFLAGS) -Wl,--gc-sections
endif
OBJS := $(SRCS:%=%.o)