only use gcc binutils wrappers when LTO is enabled

Use gcc wrappers like gcc-ar/gcc-nm/gcc-ranlib only when LTO is enabled.
This commit is contained in:
Rafael Kitover 2016-12-14 05:48:37 -08:00
parent 8c309eaaf4
commit 7b1b1ea236
1 changed files with 3 additions and 1 deletions

View File

@ -329,7 +329,9 @@ IF(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
# for the gcc -fstack-protector* flags we need libssp # for the gcc -fstack-protector* flags we need libssp
# we also have to use the gcc- binutils for LTO to work # we also have to use the gcc- binutils for LTO to work
IF(CMAKE_COMPILER_IS_GNUCXX) IF(CMAKE_COMPILER_IS_GNUCXX)
IF(ENABLE_LTO)
INCLUDE(UseGCCBinUtilsWrappers) INCLUDE(UseGCCBinUtilsWrappers)
ENDIF(ENABLE_LTO)
IF(WIN32) IF(WIN32)
SET(SSP_STATIC ON) SET(SSP_STATIC ON)