[CMAKE]
authorDmitry Gorbachev <gorbachev@reactos.org>
Fri, 15 Aug 2014 11:12:09 +0000 (11:12 +0000)
committerDmitry Gorbachev <gorbachev@reactos.org>
Fri, 15 Aug 2014 11:12:09 +0000 (11:12 +0000)
Thin & Slim link-time optimization (requires up-to-date binutils).

svn path=/trunk/; revision=63893

reactos/cmake/gcc.cmake
reactos/toolchain-gcc.cmake

index d3b6a06..2dc7d48 100644 (file)
@@ -115,7 +115,7 @@ endif()
 
 # Link-time code generation
 if(LTCG)
 
 # Link-time code generation
 if(LTCG)
-    add_compile_flags("-flto -ffat-lto-objects")
+    add_compile_flags("-flto -fno-fat-lto-objects")
 endif()
 
 if(ARCH STREQUAL "i386")
 endif()
 
 if(ARCH STREQUAL "i386")
index fe74663..8cd6a4c 100644 (file)
@@ -46,12 +46,9 @@ set(CMAKE_ASM_COMPILER_ID "GNU")
 set(CMAKE_MC_COMPILER ${MINGW_TOOLCHAIN_PREFIX}windmc)
 set(CMAKE_RC_COMPILER ${MINGW_TOOLCHAIN_PREFIX}windres)
 set(CMAKE_DLLTOOL ${MINGW_TOOLCHAIN_PREFIX}dlltool)
 set(CMAKE_MC_COMPILER ${MINGW_TOOLCHAIN_PREFIX}windmc)
 set(CMAKE_RC_COMPILER ${MINGW_TOOLCHAIN_PREFIX}windres)
 set(CMAKE_DLLTOOL ${MINGW_TOOLCHAIN_PREFIX}dlltool)
+set(CMAKE_AR ${MINGW_TOOLCHAIN_PREFIX}gcc-ar${MINGW_TOOLCHAIN_SUFFIX})
 
 
-if(NOT LTCG)
-    set(CMAKE_C_CREATE_STATIC_LIBRARY "<CMAKE_AR> crT <TARGET> <LINK_FLAGS> <OBJECTS>")
-else()
-    set(CMAKE_C_CREATE_STATIC_LIBRARY "<CMAKE_AR> cr <TARGET> <LINK_FLAGS> <OBJECTS>")
-endif()
+set(CMAKE_C_CREATE_STATIC_LIBRARY "<CMAKE_AR> crT <TARGET> <LINK_FLAGS> <OBJECTS>")
 set(CMAKE_CXX_CREATE_STATIC_LIBRARY ${CMAKE_C_CREATE_STATIC_LIBRARY})
 set(CMAKE_ASM_CREATE_STATIC_LIBRARY ${CMAKE_C_CREATE_STATIC_LIBRARY})
 
 set(CMAKE_CXX_CREATE_STATIC_LIBRARY ${CMAKE_C_CREATE_STATIC_LIBRARY})
 set(CMAKE_ASM_CREATE_STATIC_LIBRARY ${CMAKE_C_CREATE_STATIC_LIBRARY})