From 7b1b1ea2365cb3e6324e62452eb8bd15e57cdaf3 Mon Sep 17 00:00:00 2001 From: Rafael Kitover Date: Wed, 14 Dec 2016 05:48:37 -0800 Subject: [PATCH] only use gcc binutils wrappers when LTO is enabled Use gcc wrappers like gcc-ar/gcc-nm/gcc-ranlib only when LTO is enabled. --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d9eae4f4..e4314f12 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 # we also have to use the gcc- binutils for LTO to work IF(CMAKE_COMPILER_IS_GNUCXX) - INCLUDE(UseGCCBinUtilsWrappers) + IF(ENABLE_LTO) + INCLUDE(UseGCCBinUtilsWrappers) + ENDIF(ENABLE_LTO) IF(WIN32) SET(SSP_STATIC ON)