mirror of
https://github.com/monero-project/monero.git
synced 2024-10-01 11:49:47 -04:00
cmake: define ARM var for all ARM arch variants
This is refactoring only. No behavior change.
This commit is contained in:
parent
6fe543dcd4
commit
1c7d3b05a9
@ -58,16 +58,20 @@ if (NOT ARCH OR ARCH STREQUAL "" OR ARCH STREQUAL "native" OR ARCH STREQUAL "def
|
|||||||
else()
|
else()
|
||||||
set(ARCH_ID "${ARCH}")
|
set(ARCH_ID "${ARCH}")
|
||||||
endif()
|
endif()
|
||||||
string(SUBSTRING ${ARCH_ID} 0 5 ARM_TEST)
|
string(TOLOWER ${ARCH_ID} ARM_ID)
|
||||||
string(TOLOWER ${ARM_TEST} ARM_TEST)
|
string(SUBSTRING ${ARCH_ID} 0 3 ARM_TEST)
|
||||||
if (${ARM_TEST} STREQUAL "armv6")
|
if (ARM_TEST STREQUAL "arm")
|
||||||
set(ARM6 1)
|
set(ARM 1)
|
||||||
endif()
|
string(SUBSTRING ${ARCH_ID} 0 5 ARM_TEST)
|
||||||
if (${ARM_TEST} STREQUAL "armv7")
|
if (ARM_TEST STREQUAL "armv6")
|
||||||
set(ARM7 1)
|
set(ARM6 1)
|
||||||
|
endif()
|
||||||
|
if (ARM_TEST STREQUAL "armv7")
|
||||||
|
set(ARM7 1)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(WIN32 OR ARM7 OR ARM6)
|
if(WIN32 OR ARM)
|
||||||
set(OPT_FLAGS_RELEASE "-O2")
|
set(OPT_FLAGS_RELEASE "-O2")
|
||||||
else()
|
else()
|
||||||
set(OPT_FLAGS_RELEASE "-Ofast")
|
set(OPT_FLAGS_RELEASE "-Ofast")
|
||||||
@ -247,7 +251,7 @@ add_definitions("-DBLOCKCHAIN_DB=${BLOCKCHAIN_DB}")
|
|||||||
find_package(Libunwind)
|
find_package(Libunwind)
|
||||||
# Can't install hook in static build on OSX, because OSX linker does not support --wrap
|
# Can't install hook in static build on OSX, because OSX linker does not support --wrap
|
||||||
# On ARM, having libunwind package (with .so's only) installed breaks static link.
|
# On ARM, having libunwind package (with .so's only) installed breaks static link.
|
||||||
if(LIBUNWIND_FOUND AND NOT (STATIC AND (APPLE OR ARM6 OR ARM7)))
|
if(LIBUNWIND_FOUND AND NOT (STATIC AND (APPLE OR ARM)))
|
||||||
set(DEFAULT_STACK_TRACE ON)
|
set(DEFAULT_STACK_TRACE ON)
|
||||||
else()
|
else()
|
||||||
set(DEFAULT_STACK_TRACE OFF)
|
set(DEFAULT_STACK_TRACE OFF)
|
||||||
@ -321,7 +325,7 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
if(CMAKE_C_COMPILER_ID STREQUAL "Clang")
|
if(CMAKE_C_COMPILER_ID STREQUAL "Clang")
|
||||||
set(WARNINGS "${WARNINGS} -Wno-deprecated-register -Wno-error=mismatched-tags -Wno-error=null-conversion -Wno-overloaded-shift-op-parentheses -Wno-error=shift-count-overflow -Wno-error=tautological-constant-out-of-range-compare -Wno-error=unused-private-field -Wno-error=unneeded-internal-declaration")
|
set(WARNINGS "${WARNINGS} -Wno-deprecated-register -Wno-error=mismatched-tags -Wno-error=null-conversion -Wno-overloaded-shift-op-parentheses -Wno-error=shift-count-overflow -Wno-error=tautological-constant-out-of-range-compare -Wno-error=unused-private-field -Wno-error=unneeded-internal-declaration")
|
||||||
if(ARM6 OR ARM7)
|
if(ARM)
|
||||||
set(WARNINGS "${WARNINGS} -Wno-error=inline-asm")
|
set(WARNINGS "${WARNINGS} -Wno-error=inline-asm")
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
@ -358,11 +362,11 @@ else()
|
|||||||
|
|
||||||
option(NO_AES "Explicitly disable AES support" ${NO_AES})
|
option(NO_AES "Explicitly disable AES support" ${NO_AES})
|
||||||
|
|
||||||
if(NOT NO_AES AND NOT (ARM6 OR ARM7))
|
if(NOT NO_AES AND NOT ARM)
|
||||||
message(STATUS "AES support enabled")
|
message(STATUS "AES support enabled")
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -maes")
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -maes")
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -maes")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -maes")
|
||||||
elseif(ARM7 OR ARM6)
|
elseif(ARM)
|
||||||
message(STATUS "AES support disabled (not available on ARM)")
|
message(STATUS "AES support disabled (not available on ARM)")
|
||||||
else()
|
else()
|
||||||
message(STATUS "AES support disabled")
|
message(STATUS "AES support disabled")
|
||||||
|
Loading…
Reference in New Issue
Block a user