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

philo 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 4dcda6a25 [VL] Upgrade simdjson to  3.9.3 in vcpkg build (#5938)
4dcda6a25 is described below

commit 4dcda6a2510ccfa468748fe1e1181a9e2ad3500e
Author: PHILO-HE <[email protected]>
AuthorDate: Mon Jun 3 11:33:06 2024 +0800

    [VL] Upgrade simdjson to  3.9.3 in vcpkg build (#5938)
---
 dev/ci-velox-buildstatic.sh             |  2 +-
 dev/vcpkg/ports/simdjson/portfile.cmake | 44 +++++++++++++++++++++++++++++++++
 dev/vcpkg/ports/simdjson/vcpkg.json     | 37 +++++++++++++++++++++++++++
 dev/vcpkg/vcpkg.json                    |  3 +--
 ep/build-velox/src/build_velox.sh       |  2 +-
 5 files changed, 84 insertions(+), 4 deletions(-)

diff --git a/dev/ci-velox-buildstatic.sh b/dev/ci-velox-buildstatic.sh
index 208490d1c..227bad360 100755
--- a/dev/ci-velox-buildstatic.sh
+++ b/dev/ci-velox-buildstatic.sh
@@ -2,8 +2,8 @@ yum install sudo patch java-1.8.0-openjdk-devel -y
 cd $GITHUB_WORKSPACE/ep/build-velox/src
 ./get_velox.sh
 source /opt/rh/devtoolset-9/enable
-source /opt/gluten/dev/vcpkg/env.sh
 cd $GITHUB_WORKSPACE/
+source ./dev/vcpkg/env.sh
 sed -i '/^headers/d' ep/build-velox/build/velox_ep/CMakeLists.txt
 export NUM_THREADS=4
 ./dev/builddeps-veloxbe.sh --build_tests=OFF --build_benchmarks=OFF 
--enable_s3=ON --enable_gcs=ON --enable_hdfs=ON --enable_abfs=ON
diff --git a/dev/vcpkg/ports/simdjson/portfile.cmake 
b/dev/vcpkg/ports/simdjson/portfile.cmake
new file mode 100644
index 000000000..ecc2321c1
--- /dev/null
+++ b/dev/vcpkg/ports/simdjson/portfile.cmake
@@ -0,0 +1,44 @@
+vcpkg_from_github(
+    OUT_SOURCE_PATH SOURCE_PATH
+    REPO simdjson/simdjson
+    REF "v${VERSION}"
+    HEAD_REF master
+    SHA512 
893ce0cb380b1418438f5910262325031f8071c4577589a491713f91c980964b4105c1e1aa7f2b9373deed40ecf6b48fe48a1aa243151e424f138f5418e4821c
+)
+
+vcpkg_check_features(
+    OUT_FEATURE_OPTIONS FEATURE_OPTIONS
+    FEATURES
+        exceptions SIMDJSON_EXCEPTIONS
+        threads    SIMDJSON_ENABLE_THREADS
+    INVERTED_FEATURES
+        deprecated SIMDJSON_DISABLE_DEPRECATED_API
+        utf8-validation SIMDJSON_SKIPUTF8VALIDATION
+)
+
+string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" SIMDJSON_BUILD_STATIC)
+
+vcpkg_cmake_configure(
+    SOURCE_PATH "${SOURCE_PATH}"
+    OPTIONS
+        -DSIMDJSON_JUST_LIBRARY=ON
+        -DSIMDJSON_SANITIZE_UNDEFINED=OFF
+        -DSIMDJSON_SANITIZE=OFF
+        -DSIMDJSON_SANITIZE_THREADS=OFF
+        -DSIMDJSON_BUILD_STATIC=${SIMDJSON_BUILD_STATIC}
+        -DSIMDJSON_DEVELOPMENT_CHECKS=OFF
+        -DSIMDJSON_VERBOSE_LOGGING=OFF
+        ${FEATURE_OPTIONS}
+)
+
+vcpkg_cmake_install()
+
+vcpkg_copy_pdbs()
+
+vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/${PORT}")
+
+vcpkg_fixup_pkgconfig()
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" 
"${CURRENT_PACKAGES_DIR}/debug/share")
+
+vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
diff --git a/dev/vcpkg/ports/simdjson/vcpkg.json 
b/dev/vcpkg/ports/simdjson/vcpkg.json
new file mode 100644
index 000000000..6e46382e4
--- /dev/null
+++ b/dev/vcpkg/ports/simdjson/vcpkg.json
@@ -0,0 +1,37 @@
+{
+  "name": "simdjson",
+  "version": "3.9.3",
+  "description": "An extremely fast JSON library that can parse gigabytes of 
JSON per second",
+  "homepage": "https://simdjson.org/";,
+  "license": "Apache-2.0",
+  "dependencies": [
+    {
+      "name": "vcpkg-cmake",
+      "host": true
+    },
+    {
+      "name": "vcpkg-cmake-config",
+      "host": true
+    }
+  ],
+  "default-features": [
+    "deprecated",
+    "exceptions",
+    "threads",
+    "utf8-validation"
+  ],
+  "features": {
+    "deprecated": {
+      "description": "Enable deprecated APIs"
+    },
+    "exceptions": {
+      "description": "Enable exception-throwing interface"
+    },
+    "threads": {
+      "description": "Link with thread support"
+    },
+    "utf8-validation": {
+      "description": "Enable UTF-8 validation"
+    }
+  }
+}
diff --git a/dev/vcpkg/vcpkg.json b/dev/vcpkg/vcpkg.json
index 4593c86e7..b7dcb059c 100644
--- a/dev/vcpkg/vcpkg.json
+++ b/dev/vcpkg/vcpkg.json
@@ -117,7 +117,6 @@
   },
   "overrides": [
     { "name": "fmt", "version": "10.1.1" },
-    { "name": "xsimd", "version": "10.0.0" },
-    { "name": "simdjson", "version": "3.2.0" }
+    { "name": "xsimd", "version": "10.0.0" }
   ]
 }
diff --git a/ep/build-velox/src/build_velox.sh 
b/ep/build-velox/src/build_velox.sh
index c13b49f30..5d9eba904 100755
--- a/ep/build-velox/src/build_velox.sh
+++ b/ep/build-velox/src/build_velox.sh
@@ -151,7 +151,7 @@ function compile {
   fi
   echo "NUM_THREADS_OPTS: $NUM_THREADS_OPTS"
 
-  export simdjson_SOURCE=BUNDLED
+  export simdjson_SOURCE=AUTO
   if [ $ARCH == 'x86_64' ]; then
     make $COMPILE_TYPE $NUM_THREADS_OPTS EXTRA_CMAKE_FLAGS="${COMPILE_OPTION}"
   elif [[ "$ARCH" == 'arm64' || "$ARCH" == 'aarch64' ]]; then


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

Reply via email to