Skip to content

Commit

Permalink
Update CMakeLists.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason2866 authored Sep 30, 2024
1 parent 22a3b09 commit 975e571
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -204,14 +204,15 @@ endif()
if(CONFIG_COMPILER_ENABLE_LTO)
set(CMAKE_AR ${_CMAKE_TOOLCHAIN_PREFIX}gcc-ar)
set(CMAKE_RANLIB ${_CMAKE_TOOLCHAIN_PREFIX}gcc-ranlib)
list(APPEND compile_options "-flto=auto"
list(APPEND compile_options "-flto=auto"
"-ffat-lto-objects"
"-flto-compression-level=9")
list(APPEND link_options "-flto"
"-fuse-linker-plugin"
"-ffat-lto-objects"
"-flto-partition=max")
else()
list(APPEND compile_options "-fno-lto")
list(APPEND link_options "-fno-lto")
endif()

Expand Down

0 comments on commit 975e571

Please sign in to comment.