make: optionally add gcc lto flags
This commit enables building using link time optimization when specifying "LTO=yes" in the application's Makefile.
This commit is contained in:
parent
43ef437e4b
commit
9cf054fe96
@ -41,3 +41,9 @@ endif
|
||||
|
||||
# Unwanted flags for c++
|
||||
CXXUWFLAGS += -std=%
|
||||
|
||||
ifeq ($(LTO),yes)
|
||||
LTOFLAGS = -flto -ffat-lto-objects
|
||||
CFLAGS += ${LTOFLAGS}
|
||||
LINKFLAGS += ${LTOFLAGS}
|
||||
endif
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user