aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2015-05-26 11:07:58 +0200
committerRiccardo Spagni <ric@spagni.net>2015-05-26 11:07:58 +0200
commit5001489353b694c7b017765278da5771b19e6f7a (patch)
tree4c12def907111b22cbeca0a113b24908c08a186a
parentMerge pull request #292 (diff)
downloadmonero-5001489353b694c7b017765278da5771b19e6f7a.tar.xz
explicitly include libc++ with clang
-rw-r--r--CMakeLists.txt7
1 files changed, 6 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b6bccc768..7ee351bb1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -278,10 +278,15 @@ else()
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")
+ # There is a clang bug that does not allow to compile code that uses AES-NI intrinsics if -flto is enabled, so explicitly disable
set(USE_LTO false)
+ # explicitly define stdlib for older versions of clang
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++")
endif()
+
+
if(USE_LTO)
set(RELEASE_FLAGS "${RELEASE_FLAGS} -flto")
if(STATIC)