Skip to content

Commit

Permalink
[VL] Upgrade simdjson to 3.9.3 in vcpkg build (#5938)
Browse files Browse the repository at this point in the history
  • Loading branch information
PHILO-HE authored Jun 3, 2024
1 parent ad817ed commit 4dcda6a
Show file tree
Hide file tree
Showing 5 changed files with 84 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dev/ci-velox-buildstatic.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
44 changes: 44 additions & 0 deletions dev/vcpkg/ports/simdjson/portfile.cmake
Original file line number Diff line number Diff line change
@@ -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")
37 changes: 37 additions & 0 deletions dev/vcpkg/ports/simdjson/vcpkg.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
}
3 changes: 1 addition & 2 deletions dev/vcpkg/vcpkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
]
}
2 changes: 1 addition & 1 deletion ep/build-velox/src/build_velox.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4dcda6a

Please sign in to comment.