From d70ed13f3adfa2bdc5958f6dad5e9539d3763253 Mon Sep 17 00:00:00 2001 From: Jason2866 <24528715+Jason2866@users.noreply.github.com> Date: Tue, 1 Oct 2024 11:20:08 +0200 Subject: [PATCH] make sure no LTO is set --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b3828bff0ce..6dcd0531efe 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -182,7 +182,7 @@ 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" @@ -190,6 +190,7 @@ if(CONFIG_COMPILER_ENABLE_LTO) "-ffat-lto-objects" "-flto-partition=max") else() + list(APPEND compile_options "-fno-lto") list(APPEND link_options "-fno-lto") endif()