Skip to content

Commit d10f793

Browse files
authored
add Linker flags
1 parent fd09a28 commit d10f793

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

main/CMakeLists.txt

+2-3
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
set(CMAKE_AR ${_CMAKE_TOOLCHAIN_PREFIX}gcc-ar)
33
set(CMAKE_RANLIB ${_CMAKE_TOOLCHAIN_PREFIX}gcc-ranlib)
44

5-
list(APPEND compile_options "-ffat-lto-objects"
6-
"-flto-compression-level=9"
7-
"-flto=auto")
5+
list(APPEND compile_options "-ffat-lto-objects" "-flto-compression-level=9" "-flto=auto")
6+
list(APPEND CMAKE_EXE_LINKER_FLAGS "-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=max")
87

98
idf_component_register(SRCS "sketch.cpp" "arduino-lib-builder-gcc.c" "arduino-lib-builder-cpp.cpp" "arduino-lib-builder-as.S" INCLUDE_DIRS ".")

0 commit comments

Comments
 (0)