aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2014-09-15 22:47:26 +0200
committerRiccardo Spagni <ric@spagni.net>2014-09-15 22:47:26 +0200
commitd8257fb67b5714af8dc5690201954432add4b229 (patch)
tree423ea15628e480a790d1c5be2ac4a5e9f15f7fd2 /CMakeLists.txt
parentFix time_t serialization issue (diff)
downloadmonero-d8257fb67b5714af8dc5690201954432add4b229.tar.xz
explicitly disable LTO for Clang
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt6
1 files changed, 5 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e182f7144..190fcc5c5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -123,8 +123,12 @@ else()
set(USE_LTO_DEFAULT true)
endif()
set(USE_LTO ${USE_LTO_DEFAULT} CACHE BOOL "Use Link-Time Optimization (Release mode only)")
+
+ # There is a clang bug that does not allow to compile code that uses AES-NI intrinsics if -flto is enabled, so explicitly disable
+ if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
+ set(USE_LTO false)
+ endif()
if(USE_LTO)
- # There is a clang bug that does not allow to compile code that uses AES-NI intrinsics if -flto is enabled
set(RELEASE_FLAGS "${RELEASE_FLAGS} -flto")
if(STATIC)
set(RELEASE_FLAGS "${RELEASE_FLAGS} -ffat-lto-objects")