explicitly include libc++ with clang
This commit is contained in:
parent
8cd6072090
commit
5001489353
|
@ -278,10 +278,15 @@ else()
|
||||||
endif()
|
endif()
|
||||||
set(USE_LTO ${USE_LTO_DEFAULT} CACHE BOOL "Use Link-Time Optimization (Release mode only)")
|
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")
|
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)
|
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()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
if(USE_LTO)
|
if(USE_LTO)
|
||||||
set(RELEASE_FLAGS "${RELEASE_FLAGS} -flto")
|
set(RELEASE_FLAGS "${RELEASE_FLAGS} -flto")
|
||||||
if(STATIC)
|
if(STATIC)
|
||||||
|
|
Loading…
Reference in New Issue