Using parallel processing for LTO if GCC ver >= 10

This forum is dedicated to feedback, discussions about ongoing or future developments, ideas and suggestions regarding the ChibiOS projects are welcome. This forum is NOT for support.
faisal
Posts: 374
Joined: Wed Jul 19, 2017 12:44 am
Has thanked: 44 times
Been thanked: 60 times

Using parallel processing for LTO if GCC ver >= 10

Postby faisal » Sat Jan 08, 2022 1:04 am

-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

Return to “Development and Feedback”

Who is online

Users browsing this forum: No registered users and 30 guests