Skip to content

Commit

Permalink
make sure no LTO is set
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason2866 authored Oct 1, 2024
1 parent 65c0dc2 commit d70ed13
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 @@ -182,14 +182,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 d70ed13

Please sign in to comment.