Skip to content

Commit

Permalink
ARROW-17440: [C++] Support RISC-V architecture (apache#13902)
Browse files Browse the repository at this point in the history
Signed-off-by: Felix Yan <[email protected]>

Lead-authored-by: Yibo Cai <[email protected]>
Co-authored-by: Felix Yan <[email protected]>
Signed-off-by: Antoine Pitrou <[email protected]>
  • Loading branch information
felixonmars authored Aug 17, 2022
1 parent 9d1bbaf commit 050876c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions cpp/cmake_modules/SetupCxxFlags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,20 @@ include(CheckCXXSourceCompiles)
message(STATUS "System processor: ${CMAKE_SYSTEM_PROCESSOR}")

if(NOT DEFINED ARROW_CPU_FLAG)
if(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64|ARM64|arm64")
if(CMAKE_SYSTEM_PROCESSOR MATCHES "AMD64|X86|x86|i[3456]86")
set(ARROW_CPU_FLAG "x86")
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64|ARM64|arm64")
set(ARROW_CPU_FLAG "armv8")
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "armv7")
set(ARROW_CPU_FLAG "armv7")
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "powerpc|ppc")
set(ARROW_CPU_FLAG "ppc")
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "s390x")
set(ARROW_CPU_FLAG "s390x")
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "riscv64")
set(ARROW_CPU_FLAG "riscv64")
else()
set(ARROW_CPU_FLAG "x86")
message(FATAL_ERROR "Unknown system processor")
endif()
endif()

Expand Down

0 comments on commit 050876c

Please sign in to comment.