This is an automated email from the ASF dual-hosted git repository.
morrysnow pushed a commit to branch branch-3.1
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-3.1 by this push:
new fd26b540bff branch-3.1: [compile](arm) Add ARM_MARCH to specify the
ARM architecture instruction set #52678 (#52722)
fd26b540bff is described below
commit fd26b540bff0068cd7d6ff69182347af34427828
Author: HappenLee <[email protected]>
AuthorDate: Thu Jul 3 19:13:09 2025 +0800
branch-3.1: [compile](arm) Add ARM_MARCH to specify the ARM architecture
instruction set #52678 (#52722)
cherry pick #52678
---
be/CMakeLists.txt | 4 ++--
build.sh | 6 ++++++
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/be/CMakeLists.txt b/be/CMakeLists.txt
index 37a85252308..f624f0a6b91 100644
--- a/be/CMakeLists.txt
+++ b/be/CMakeLists.txt
@@ -347,9 +347,9 @@ if ("${CMAKE_BUILD_TARGET_ARCH}" STREQUAL "x86" OR
"${CMAKE_BUILD_TARGET_ARCH}"
endif()
if (ARCH_ARM)
- add_compile_options(-march=armv8-a+crc)
+ add_compile_options(-march=${ARM_MARCH})
+ message(STATUS "ARM_MARCH is ${ARM_MARCH}")
endif()
-#
if (WITH_MYSQL)
add_definitions(-DDORIS_WITH_MYSQL)
diff --git a/build.sh b/build.sh
index 169f5a8c72a..3104fa51655 100755
--- a/build.sh
+++ b/build.sh
@@ -65,6 +65,7 @@ Usage: $0 <options>
Environment variables:
USE_AVX2 If the CPU does not support AVX2 instruction
set, please set USE_AVX2=0. Default is ON.
+ ARM_MARCH Specify the ARM architecture instruction set.
Default is armv8-a+crc.
STRIP_DEBUG_INFO If set STRIP_DEBUG_INFO=ON, the debug
information in the compiled binaries will be stored separately in the
'be/lib/debug_info' directory. Default is OFF.
DISABLE_BE_JAVA_EXTENSIONS If set DISABLE_BE_JAVA_EXTENSIONS=ON, we will
do not build binary with java-udf,hadoop-hudi-scanner,jdbc-scanner and so on
Default is OFF.
DISABLE_JAVA_CHECK_STYLE If set DISABLE_JAVA_CHECK_STYLE=ON, it will
skip style check of java code in FE.
@@ -87,6 +88,7 @@ Usage: $0 <options>
USE_AVX2=0 $0 --be build Backend and not using AVX2
instruction.
USE_AVX2=0 STRIP_DEBUG_INFO=ON $0 build all and not using AVX2
instruction, and strip the debug info for Backend
+ ARM_MARCH=armv8-a+crc+simd $0 --be build Backend with specified ARM
architecture instruction set
"
exit 1
}
@@ -357,6 +359,9 @@ fi
if [[ -z "${USE_AVX2}" ]]; then
USE_AVX2='ON'
fi
+if [[ -z "${ARM_MARCH}" ]]; then
+ ARM_MARCH='armv8-a+crc'
+fi
if [[ -z "${USE_LIBCPP}" ]]; then
if [[ "${TARGET_SYSTEM}" != 'Darwin' ]]; then
USE_LIBCPP='OFF'
@@ -612,6 +617,7 @@ if [[ "${BUILD_BE}" -eq 1 ]]; then
-DUSE_MEM_TRACKER="${USE_MEM_TRACKER}" \
-DUSE_JEMALLOC="${USE_JEMALLOC}" \
-DUSE_AVX2="${USE_AVX2}" \
+ -DARM_MARCH="${ARM_MARCH}" \
-DGLIBC_COMPATIBILITY="${GLIBC_COMPATIBILITY}" \
-DEXTRA_CXX_FLAGS="${EXTRA_CXX_FLAGS}" \
-DENABLE_CLANG_COVERAGE="${DENABLE_CLANG_COVERAGE}" \
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]