This is an automated email from the ASF dual-hosted git repository.
apitrou pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/master by this push:
new 050876c5b5 ARROW-17440: [C++] Support RISC-V architecture (#13902)
050876c5b5 is described below
commit 050876c5b502e73339de4d45e9bb2b54a3b3e095
Author: Felix Yan <[email protected]>
AuthorDate: Wed Aug 17 11:47:34 2022 +0300
ARROW-17440: [C++] Support RISC-V architecture (#13902)
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]>
---
cpp/cmake_modules/SetupCxxFlags.cmake | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/cpp/cmake_modules/SetupCxxFlags.cmake
b/cpp/cmake_modules/SetupCxxFlags.cmake
index abd5635a35..a70ae5d1e2 100644
--- a/cpp/cmake_modules/SetupCxxFlags.cmake
+++ b/cpp/cmake_modules/SetupCxxFlags.cmake
@@ -24,7 +24,9 @@ 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")
@@ -32,8 +34,10 @@ if(NOT DEFINED ARROW_CPU_FLAG)
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()