File tree Expand file tree Collapse file tree 1 file changed +2
-15
lines changed Expand file tree Collapse file tree 1 file changed +2
-15
lines changed Original file line number Diff line number Diff line change @@ -179,21 +179,6 @@ if(CONFIG_COMPILER_DISABLE_GCC14_WARNINGS)
179179    list (APPEND  compile_options "-Wno-calloc-transposed-args" )
180180endif ()
181181
182- if (CONFIG_COMPILER_ENABLE_LTO)
183-     set (CMAKE_AR  ${_CMAKE_TOOLCHAIN_PREFIX} gcc-ar)
184-     set (CMAKE_RANLIB  ${_CMAKE_TOOLCHAIN_PREFIX} gcc-ranlib)
185-     list (APPEND  compile_options     "-flto=auto" 
186-                                     "-ffat-lto-objects" 
187-                                     "-flto-compression-level=9" )
188-     list (APPEND  link_options        "-flto" 
189-                                     "-fuse-linker-plugin" 
190-                                     "-ffat-lto-objects" 
191-                                     "-flto-partition=max" )
192- else ()
193-     list (APPEND  compile_options     "-fno-lto" )
194-     list (APPEND  link_options        "-fno-lto" )
195- endif ()
196- 
197182if (CONFIG_COMPILER_DISABLE_DEFAULT_ERRORS)
198183    if (NOT  CMAKE_C_COMPILER_ID MATCHES  "Clang" )
199184        idf_build_replace_option_from_property(COMPILE_OPTIONS "-Werror"  "-Werror=all" )
@@ -213,6 +198,8 @@ if(CONFIG_ESP_SYSTEM_USE_EH_FRAME)
213198  list (APPEND  link_options "-Wl,--eh-frame-hdr" )
214199endif ()
215200
201+ list (APPEND  link_options "-fno-lto" )
202+ 
216203if (CONFIG_IDF_TARGET_LINUX AND  CMAKE_HOST_SYSTEM_NAME  STREQUAL  "Darwin" )
217204    # Not all versions of the MacOS linker support the -warn_commons flag. 
218205    # ld version 1053.12 (and above) have been tested to support it. 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments