Commit 4114060a authored by siddontang's avatar siddontang Committed by yiwu-arbug

build on ARM64 (#21)

Signed-off-by: siddontang siddontang@gmail.com

Copy from https://github.com/facebook/rocksdb/blob/master/CMakeLists.txt#L210
parent b4311d1c
...@@ -76,6 +76,15 @@ if(CMAKE_SYSTEM_PROCESSOR MATCHES "ppc64le") ...@@ -76,6 +76,15 @@ if(CMAKE_SYSTEM_PROCESSOR MATCHES "ppc64le")
endif(HAS_ALTIVEC) endif(HAS_ALTIVEC)
endif(CMAKE_SYSTEM_PROCESSOR MATCHES "ppc64le") endif(CMAKE_SYSTEM_PROCESSOR MATCHES "ppc64le")
if(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64|AARCH64")
CHECK_C_COMPILER_FLAG("-march=armv8-a+crc" HAS_ARMV8_CRC)
if(HAS_ARMV8_CRC)
message(STATUS " HAS_ARMV8_CRC yes")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=armv8-a+crc -Wno-unused-function")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=armv8-a+crc -Wno-unused-function")
endif(HAS_ARMV8_CRC)
endif(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64|AARCH64")
option(PORTABLE "build a portable binary" OFF) option(PORTABLE "build a portable binary" OFF)
option(FORCE_SSE42 "force building with SSE4.2, even when PORTABLE=ON" OFF) option(FORCE_SSE42 "force building with SSE4.2, even when PORTABLE=ON" OFF)
if(PORTABLE) if(PORTABLE)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment