mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-11-23 10:37:37 -07:00
explicitly disable LTO for Clang
This commit is contained in:
parent
9db881864d
commit
d8257fb67b
@ -123,8 +123,12 @@ else()
|
|||||||
set(USE_LTO_DEFAULT true)
|
set(USE_LTO_DEFAULT true)
|
||||||
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")
|
||||||
|
set(USE_LTO false)
|
||||||
|
endif()
|
||||||
if(USE_LTO)
|
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")
|
set(RELEASE_FLAGS "${RELEASE_FLAGS} -flto")
|
||||||
if(STATIC)
|
if(STATIC)
|
||||||
set(RELEASE_FLAGS "${RELEASE_FLAGS} -ffat-lto-objects")
|
set(RELEASE_FLAGS "${RELEASE_FLAGS} -ffat-lto-objects")
|
||||||
|
Loading…
Reference in New Issue
Block a user