Skip to content

Commit 35bffea

Browse files
committed
Merge branch 'main' into dev/grendel/blazor-hang
* main: Switch 64-bit hashes to xxhash3 (#8721) Bump to xamarin/monodroid@fefc158ef3 (#8850) Bump binutils to 17.0.6-7.2.1 (#8806)
2 parents b45cbfb + 6d2a4bb commit 35bffea

File tree

13 files changed

+597
-117
lines changed

13 files changed

+597
-117
lines changed

.external

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
xamarin/monodroid:main@77124dc16985a92077e62b0cfeaeb007c4d4fd2a
1+
xamarin/monodroid:main@fefc158ef36d056249e8775df4e5d409a70119e2

.gitmodules

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,9 @@
2525
[submodule "external/libunwind"]
2626
path = external/libunwind
2727
url = https://github.com/libunwind/libunwind.git
28+
[submodule "external/xxHash"]
29+
path = external/xxHash
30+
url = https://github.com/Cyan4973/xxHash.git
31+
[submodule "external/constexpr-xxh3"]
32+
path = external/constexpr-xxh3
33+
url = https://github.com/chys87/constexpr-xxh3.git

THIRD-PARTY-NOTICES.TXT

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -516,3 +516,68 @@ SOFTWARE.
516516
======================================================
517517
END OF tessil/robin-map NOTICES AND INFORMATION
518518

519+
%% chys87/constexpr-xxh3 NOTICES AND INFORMATION BEGIN HERE
520+
===========================================================
521+
522+
BSD 2-Clause License
523+
524+
constexpr-xxh3 - C++20 constexpr implementation of the XXH3 64-bit variant of xxHash
525+
Copyright (c) 2021-2023, chys <admin@chys.info> <chys87@github>
526+
All rights reserved.
527+
528+
Redistribution and use in source and binary forms, with or without
529+
modification, are permitted provided that the following conditions are met:
530+
531+
1. Redistributions of source code must retain the above copyright notice, this
532+
list of conditions and the following disclaimer.
533+
534+
2. Redistributions in binary form must reproduce the above copyright notice,
535+
this list of conditions and the following disclaimer in the documentation
536+
and/or other materials provided with the distribution.
537+
538+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
539+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
540+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
541+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
542+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
543+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
544+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
545+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
546+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
547+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
548+
549+
======================================================
550+
END OF chys87/constexpr-xxh3 NOTICES AND INFORMATION
551+
552+
%% Cyan4973/xxHash NOTICES AND INFORMATION BEGIN HERE
553+
=====================================================
554+
555+
xxHash Library
556+
Copyright (c) 2012-2021 Yann Collet
557+
All rights reserved.
558+
559+
BSD 2-Clause License (https://www.opensource.org/licenses/bsd-license.php)
560+
561+
Redistribution and use in source and binary forms, with or without modification,
562+
are permitted provided that the following conditions are met:
563+
564+
* Redistributions of source code must retain the above copyright notice, this
565+
list of conditions and the following disclaimer.
566+
567+
* Redistributions in binary form must reproduce the above copyright notice, this
568+
list of conditions and the following disclaimer in the documentation and/or
569+
other materials provided with the distribution.
570+
571+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
572+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
573+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
574+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
575+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
576+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
577+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
578+
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
579+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
580+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
581+
582+
%% END OF Cyan4973/xxHash NOTICES AND INFORMATION
583+
=================================================

build-tools/scripts/generate-pinvoke-tables.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ GENERATOR_BINARY="${MONODROID_SOURCE_DIR}/generate-pinvoke-tables"
88
TARGET_FILE="${MONODROID_SOURCE_DIR}/pinvoke-tables.include"
99
GENERATED_FILE="${TARGET_FILE}.generated"
1010
DIFF_FILE="${TARGET_FILE}.diff"
11+
EXTERNAL_DIR="${MY_DIR}/../../external/"
1112

1213
function die()
1314
{
@@ -62,7 +63,7 @@ case ${HOST} in
6263
*) die Unsupported OS ;;
6364
esac
6465

65-
${COMPILER} -O2 -std=c++20 "${GENERATOR_SOURCE}" -o "${GENERATOR_BINARY}"
66+
${COMPILER} -O2 -std=c++20 -I${EXTERNAL_DIR} -I${EXTERNAL_DIR}/constexpr-xxh3 "${GENERATOR_SOURCE}" -o "${GENERATOR_BINARY}"
6667
"${GENERATOR_BINARY}" "${GENERATED_FILE}"
6768

6869
FILES_DIFFER="no"

build-tools/xaprepare/xaprepare/ConfigAndData/Configurables.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ namespace Xamarin.Android.Prepare
1515
//
1616
partial class Configurables
1717
{
18-
const string BinutilsVersion = "L_17.0.6-7.1.0";
18+
const string BinutilsVersion = "L_17.0.6-7.2.1";
1919

2020
const string MicrosoftOpenJDK17Version = "17.0.8";
2121
const string MicrosoftOpenJDK17Release = "17.0.8.7";

external/constexpr-xxh3

Submodule constexpr-xxh3 added at aebcee7

external/xxHash

Submodule xxHash added at bbb27a5

src/Xamarin.Android.Build.Tasks/Utilities/MonoAndroidHelper.Basic.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ public static ulong GetMangledAssemblyNameSizeOverhead ()
223223
public static ulong GetXxHash (byte[] stringBytes, bool is64Bit)
224224
{
225225
if (is64Bit) {
226-
return XxHash64.HashToUInt64 (stringBytes);
226+
return XxHash3.HashToUInt64 (stringBytes);
227227
}
228228

229229
return (ulong)XxHash32.HashToUInt32 (stringBytes);

src/Xamarin.Android.Build.Tasks/Utilities/TypeMapHelper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public static ulong HashJavaName (string name, bool is64Bit)
2323
static ulong HashBytes (byte[] bytes, bool is64Bit)
2424
{
2525
if (is64Bit) {
26-
return XxHash64.HashToUInt64 (bytes);
26+
return XxHash3.HashToUInt64 (bytes);
2727
}
2828

2929
return (ulong)XxHash32.HashToUInt32 (bytes);

src/monodroid/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,16 +65,20 @@ set(LZ4_SRC_DIR "${EXTERNAL_DIR}/lz4/lib")
6565
set(LZ4_INCLUDE_DIR ${LZ4_SRC_DIR})
6666
set(XA_BIN_DIR "${REPO_ROOT_DIR}/bin/${XA_BUILD_CONFIGURATION}")
6767
set(ROBIN_MAP_DIR "${EXTERNAL_DIR}/robin-map")
68+
set(XXHASH_DIR "${EXTERNAL_DIR}/xxHash")
69+
set(CONSTEXPR_XXH3_DIR "${EXTERNAL_DIR}/constexpr-xxh3")
6870

6971
set(LZ4_SOURCES
7072
"${LZ4_SRC_DIR}/lz4.c"
7173
)
7274

7375
# Include directories
7476
include_directories(${CMAKE_CURRENT_BINARY_DIR}/include/ ${CMAKE_SOURCE_DIR}/include)
77+
include_directories(${EXTERNAL_DIR})
7578

7679
# The SYSTEM which will make clang skip warnings for the headers there. Since we can't do
7780
# much about them, we can just as well avoid cluttered build output.
81+
include_directories(SYSTEM ${CONSTEXPR_XXH3_DIR})
7882
include_directories(SYSTEM ${ROBIN_MAP_DIR}/include)
7983
include_directories(SYSTEM ${LZ4_INCLUDE_DIR})
8084

0 commit comments

Comments
 (0)