This is an automated email from the ASF dual-hosted git repository.

lihaopeng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new a085273f7ca [compile](arm) Add ARM_MARCH to specify the ARM 
architecture instruction set (#52678)
a085273f7ca is described below

commit a085273f7ca2c30c285eee2f61fd7708a6057ae6
Author: HappenLee <[email protected]>
AuthorDate: Thu Jul 3 12:20:02 2025 +0800

    [compile](arm) Add ARM_MARCH to specify the ARM architecture instruction 
set (#52678)
    
    To use different ARM_MARCH to specify the ARM architecture instruction set
---
 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 2cefb39239c..5797c82d1d5 100644
--- a/be/CMakeLists.txt
+++ b/be/CMakeLists.txt
@@ -351,10 +351,10 @@ 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}")
     add_definitions(-DLIBDIVIDE_NEON)
 endif()
-#
 
 if (ENABLE_INJECTION_POINT)
     set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -DENABLE_INJECTION_POINT")
diff --git a/build.sh b/build.sh
index f4cb2c0b2c6..f2f5b11e1e8 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.
@@ -89,6 +90,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
 }
@@ -366,6 +368,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'
@@ -610,6 +615,7 @@ if [[ "${BUILD_BE}" -eq 1 ]]; then
         -DENABLE_PCH="${ENABLE_PCH}" \
         -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]

Reply via email to