add lto for cmake

This commit is contained in:
hathach
2023-06-01 12:36:08 +07:00
parent ddc029ce54
commit 19a597bcae
10 changed files with 200 additions and 183 deletions

View File

@@ -6,6 +6,9 @@ endif ()
set(SDK_DIR ${TOP}/hw/mcu/nxp/lpcopen/lpc18xx/lpc_chip_18xx)
# enable LTO
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
# toolchain set up
set(CMAKE_SYSTEM_PROCESSOR cortex-m3 CACHE INTERNAL "System Processor")
set(CMAKE_TOOLCHAIN_FILE ${TOP}/tools/cmake/toolchain/arm_${TOOLCHAIN}.cmake)
@@ -65,7 +68,7 @@ endif () # BOARD_TARGET
# Functions
#------------------------------------
function(family_configure_example TARGET)
family_support_configure_common(${TARGET})
family_configure_common(${TARGET})
#---------- Port Specific ----------
# These files are built for each example since it depends on example's tusb_config.h