Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[xxhash]Upgrade version to 0.7.0 and fix arm/uwp build errors. #6750

Merged
merged 1 commit into from
Jun 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ports/xxhash/CONTROL
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Source: xxhash
Version: 0.6.4-1
Version: 0.7.0
Description: Extremely fast hash algorithm
34 changes: 34 additions & 0 deletions ports/xxhash/fix-arm-uwp.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
diff --git a/xxh3.h b/xxh3.h
index 0972c46..e5c7101 100644
--- a/xxh3.h
+++ b/xxh3.h
@@ -40,7 +40,7 @@
#ifndef XXH3_H
#define XXH3_H

-
+#pragma warning (disable : 4146)
/* === Dependencies === */

#undef XXH_INLINE_ALL /* in case it's already defined */
@@ -97,7 +97,7 @@
#endif

/* U64 XXH_mult32to64(U32 a, U64 b) { return (U64)a * (U64)b; } */
-#ifdef _MSC_VER
+#if defined(_MSC_VER) && (!_WIN32_WINNT >= 0x0A00)
# include <intrin.h>
/* MSVC doesn't do a good job with the mull detection. */
# define XXH_mult32to64 __emulu
diff --git a/xxhsum.c b/xxhsum.c
index 0ec11c0..7d39c24 100644
--- a/xxhsum.c
+++ b/xxhsum.c
@@ -31,6 +31,7 @@
#ifndef XXHASH_C_2097394837
#define XXHASH_C_2097394837

+#pragma warning (disable : 4146)
/* ************************************
* Compiler Options
**************************************/
9 changes: 6 additions & 3 deletions ports/xxhash/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO Cyan4973/xxHash
REF v0.6.4
SHA512 6c914bac5092dfd01349c8223c382d3c13ba1b22e08300ce86ea9663a9a934f930debdeb71c14365ec57d72b95088a4354da92dfb7fcf7d07ec01c0f4fb70ca7
HEAD_REF dev)
REF a728fc9fe895460ff0e5f1efc2ce233d2095fd20
SHA512 7795be00054d5f7abf4afab5912cc532bfc47f0bc8278cf09a44feb854f11e921d3d43e734efda1edbae0722450e4f9f02eeb5954220293eac930b4fa13ff737
HEAD_REF dev
PATCHES fix-arm-uwp.patch
)

vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}/cmake_unofficial
Expand All @@ -18,6 +20,7 @@ vcpkg_install_cmake()
vcpkg_copy_pdbs()

file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)

file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/xxhash)
Expand Down