Page 1 of 1

Using parallel processing for LTO if GCC ver >= 10

Posted: Sat Jan 08, 2022 1:04 am
by faisal
-flto=auto was introduced in GCC10. You can do this in rules.mk to enable it.

Code: Select all

# Link time optimizations
ifeq ($(USE_LTO),yes)
   ifeq ($(shell test $$($(CC) -dumpversion | cut -d. -f1) -ge 10; echo $$?),0)
      OPT += -flto=auto
   else
      OPT += -flto
   endif
endif