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

yuanzhou pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-gluten.git


The following commit(s) were added to refs/heads/main by this push:
     new 27e91ef290 [GLUTEN-8981][VL] Add vcpkg triplet for building Gluten on 
arm (#8982)
27e91ef290 is described below

commit 27e91ef2901d8f0fbd72414fbba121dd5132ace3
Author: zmdaodao <[email protected]>
AuthorDate: Fri Apr 25 06:27:59 2025 +0800

    [GLUTEN-8981][VL] Add vcpkg triplet for building Gluten on arm (#8982)
    
    * [BUILD][VL]dd the arm64-linux-neon.cmake file to manually modify 
VCPKG_CXX_FLAGS on the arm platform. fixed Environment variable 
VCPKG_FORCE_SYSTEM_BINARIES[VL][BUILD]
    
    * [fixed]format arm64-linux-neon.cmake fixed[fixed]
---
 dev/package-vcpkg.sh                      |  5 +++++
 dev/vcpkg/env.sh                          |  2 +-
 dev/vcpkg/triplets/arm64-linux-neon.cmake | 10 ++++++++++
 3 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/dev/package-vcpkg.sh b/dev/package-vcpkg.sh
index 9115582235..618846b49e 100755
--- a/dev/package-vcpkg.sh
+++ b/dev/package-vcpkg.sh
@@ -33,6 +33,11 @@ if [ "$LINUX_OS" == "centos" ]; then
   fi
 fi
 
+if [ "$ARCH" = "aarch64" ]; then
+  export VCPKG_FORCE_SYSTEM_BINARIES=1
+  export CPU_TARGET="aarch64"
+fi
+
 
 # build gluten with velox backend, prompt always respond y
 export PROMPT_ALWAYS_RESPOND=y
diff --git a/dev/vcpkg/env.sh b/dev/vcpkg/env.sh
index 8f5efdbb33..ae5e6ca44a 100755
--- a/dev/vcpkg/env.sh
+++ b/dev/vcpkg/env.sh
@@ -10,7 +10,7 @@ SCRIPT_ROOT="$(realpath "$(dirname "${BASH_SOURCE[0]}")")"
 
 export VCPKG_ROOT="$SCRIPT_ROOT/.vcpkg"
 export VCPKG="$SCRIPT_ROOT/.vcpkg/vcpkg"
-export VCPKG_TRIPLET=$([ "${CPU_TARGET:-}" = "aarch64" ] && echo 
"arm64-linux-release" || echo "x64-linux-avx")
+export VCPKG_TRIPLET=$([ "${CPU_TARGET:-}" = "aarch64" ] && echo 
"arm64-linux-neon" || echo "x64-linux-avx")
 export 
VCPKG_TRIPLET_INSTALL_DIR=${SCRIPT_ROOT}/vcpkg_installed/${VCPKG_TRIPLET}
 
 ${SCRIPT_ROOT}/init.sh "$@"
diff --git a/dev/vcpkg/triplets/arm64-linux-neon.cmake 
b/dev/vcpkg/triplets/arm64-linux-neon.cmake
new file mode 100644
index 0000000000..28694958a3
--- /dev/null
+++ b/dev/vcpkg/triplets/arm64-linux-neon.cmake
@@ -0,0 +1,10 @@
+set(VCPKG_BUILD_TYPE release)
+set(VCPKG_TARGET_ARCHITECTURE arm64)
+set(VCPKG_CRT_LINKAGE dynamic)
+set(VCPKG_LIBRARY_LINKAGE static)
+
+set(VCPKG_CMAKE_SYSTEM_NAME Linux)
+
+set(VCPKG_C_FLAGS "-march=armv8-a+crc")
+set(VCPKG_CXX_FLAGS "-march=armv8-a+crc -std=c++17")
+set(VCPKG_LINKER_FLAGS "-static-libstdc++ -static-libgcc")


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to